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!