how can i integrate exponential function ?
1 view (last 30 days)
Show older comments
i have this function : syms y1 ; syms y2 ; syms b1x ; syms b2x; syms s11;syms s22 ; syms s12 ; syms k ;syms t;
q = s11*(b1x - y1)^2 + s22*(b2x - y2)^2 + s12*(b1x - y1)*(b2x - y2)
fun=@(y1) k*y1 * exp(-q/(2*t))
f=int(fun,y1)
****************************
there is no result in matlab , can any one help me, please ?
0 Comments
Answers (1)
Star Strider
on 13 Apr 2018
Use a symbolic function (in R2012a and later versions):
syms y1 y2 b1x b2x s11 s22 s12 s k t
q = s11*(b1x - y1)^2 + s22*(b2x - y2)^2 + s12*(b1x - y1)*(b2x - y2);
fun(y1) = k*y1 * exp(-q/(2*t));
f = int(fun,y1)
f = simplify(f, 'Steps',20)
producing:
f(y1) =
- (k*t*exp(-(s11*b1x^2 + s12*b1x*b2x - 2*s11*b1x*y1 - s12*b1x*y2 + s22*b2x^2 - s12*b2x*y1 - 2*s22*b2x*y2 + s11*y1^2 + s12*y1*y2 + s22*y2^2)/(2*t)))/s11 - (2^(1/2)*k*pi^(1/2)*erf((2^(1/2)*(b1x*s11*2i + b2x*s12*1i - s11*y1*2i - s12*y2*1i))/(4*t*(-s11/t)^(1/2)))*exp(-((b2x - y2)^2*(- s12^2 + 4*s11*s22))/(8*s11*t))*(2*b1x*s11 + b2x*s12 - s12*y2)*1i)/(4*s11*(-s11/t)^(1/2))
0 Comments
See Also
Categories
Find more on Calculus 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!