How can I integrate symbolically a coupled vector function?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to get a symbolic expression for the integration of a vector function arrising from a coupled differential equation, given that I want a symbolic result, I can't use ode45 and the int()m function is not working for me. My code is the following, if anyone could give me a hint about how to integrate it, it would be really appreciated.
syms v1 m u1 rho_0 beta y1 s cd g Tmax delta_u delta_v delta_y
F = [v1+delta_v;(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u];
% F = [v1+x(2);(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*X(2)-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*X(1))-g+(Tmax/m)*delta_u]; (Expression for ode45)
5 个评论
Walter Roberson
2023-4-13
It is not clear to me what is to be integrated and what the variable of integration is and what the bounds of integration are.
syms v1 m u1 rho_0 beta y1 s cd g Tmax delta_u delta_v delta_y
F = [v1+delta_v;(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u]
syms LB UB
int(F, delta_v, LB, UB)
int(F, delta_y, LB, UB)
Those look valid to me.
回答(1 个)
Torsten
2023-4-13
移动:Torsten
2023-4-13
So your equations are
d(delta_v)/dt = v1 + delta_v
d(delta_y)/dt = (1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u
with all parameters except delta_v and delta_y known values ?
Then the following approach should work. Look at your equations to see how a, b, c and d have to be set.
syms t x(t) y(t)
syms a b c d real
eqn1 = diff(x,t) == a + x;
eqn2 = diff(y,t) == b*x + c*y + d
dsolve([eqn1,eqn2])
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!