Why would this integral function be explicit?
Show older comments

I would like to solve the gamma*, other parameters will be given in the codes I wrote.
T = 1;
sigma = 0.3;
r = 0.09;
a = r - sigma^2/2;
syms t gamma_s;
eqa1 = int(exp(-3*t^2*gamma_s*sigma/2/T^2 + a*t + sigma^2*(t - 3*t^4/4/T^3)/2), t, 0, T);
eqa2 = T*exp(a*t - 3*gamma_s*sigma/2 + T*sigma^2/8);
Gamma_s = solve(eqa1 == eqa2,gamma_s);
And it returns
Unable to find explicit solution. For options
1 Comment
Walter Roberson
on 2 Feb 2021
There isn't even a closed form formula for
let alone your more complicated formula.
Answers (1)
Star Strider
on 2 Feb 2021
I would solve it numerically:
T = 1;
sigma = 0.3;
r = 0.09;
a = r - sigma^2/2;
K = 100;
S_0 = 100;
% syms t gamma_s;
eqa1 = @(gamma_s) integral(@(t)exp(-3*t^2*gamma_s*sigma/2/T^2 + a*t + sigma^2*(t - 3*t^4/4/T^3)/2), 0, T, 'ArrayValued',1);
eqa2 = @(gamma_s) T*exp(a*T - 3*gamma_s*sigma/2 + T*sigma^2/8);
Gamma_s = fsolve(@(x) eqa1(x) - eqa2(x), 1)
Gs = logspace(-4, 8, 1E+5);
figure
semilogx(Gs, eqa1(Gs) - eqa2(Gs))
hold on
plot(Gamma_s, 0, 'p')
hold off
grid
producing:
Gamma_s =
0.059750259559572
and the plot.
In ‘eqa2’ I substituted ‘T’ for ’t’ because the first function, ‘eqa1’ is not a function of ‘t’, only ‘gamma_s’. That may also be the reason that the symbolic solution failed.
The plot demonstrates that there is only one point where the two functions are equal.
2 Comments
Ziyi Gao
on 2 Feb 2021
Star Strider
on 2 Feb 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Categories
Find more on Gamma Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!