how can i integrate exponential function ?

1 次查看(过去 30 天)
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 ?

回答(1 个)

Star Strider
Star Strider 2018-4-13
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))

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by