How to solve a non-linear equation where each element of the array is a parameterized function?
古いコメントを表示
Dear all,
I need to solve an equation with the following form:
[f(a,b,c); g(a,b,c); p(a,b,c)] = [0; 0; q(t)]
Ok, it's more like
[f(a,b,c,da,db,dc,d2a,d2b,d2c); g(a,b,c,da, db,dc,d2a,d2b,d2c); p(a,b,c,da,db,dc,d2a,d2b,d2c);] = [0; 0; q(t)]
(where "da" means "da/dt" and "d2a" means "d2a/dt2", got using fulldiff())
Or, exactly:
A=
12*d2Gama*cos(Alpha)*cos(Gama)^2 - (9*d2Beta*cos(Gama))/10 - (9*d2Alpha*cos(Beta)*sin(Gama))/10 - 12*d2Gama*cos(Alpha) + 12*d2Gama*cos(Beta)*cos(Gama)^2 - (9*dAlpha^2*cos(Beta)*cos(Gama)*sin(Beta))/10 - 12*dGama^2*cos(Alpha)*cos(Gama)*sin(Gama) - 12*dGama^2*cos(Beta)*cos(Gama)*sin(Gama) + 12*dGama^2*cos(Gama)^2*sin(Alpha)*sin(Beta) + (9*dAlpha*dBeta*sin(Beta)*sin(Gama))/5 + 12*d2Gama*cos(Gama)*sin(Alpha)*sin(Beta)*sin(Gama); (9*d2Alpha*cos(Beta)*cos(Gama))/10 - 12*dGama^2*cos(Beta) - (9*d2Beta*sin(Gama))/10 + 12*d2Gama*sin(Alpha)*sin(Beta) + 12*dGama^2*cos(Alpha)*cos(Gama)^2 + 12*dGama^2*cos(Beta)*cos(Gama)^2 - 12*d2Gama*cos(Gama)^2*sin(Alpha)*sin(Beta) - (9*dAlpha^2*cos(Beta)*sin(Beta)*sin(Gama))/10 - (9*dAlpha*dBeta*cos(Gama)*sin(Beta))/5 + 12*d2Gama*cos(Alpha)*cos(Gama)*sin(Gama) + 12*d2Gama*cos(Beta)*cos(Gama)*sin(Gama) + 12*dGama^2*cos(Gama)*sin(Alpha)*sin(Beta)*sin(Gama); 12*dGama^2*sin(Beta)*sin(Gama) - (9*dBeta^2)/10 - 12*d2Gama*cos(Gama)*sin(Beta) - (9*dAlpha^2*cos(Beta)^2)/10 + 12*dGama^2*cos(Beta)*cos(Gama)*sin(Alpha) + 12*d2Gama*cos(Beta)*sin(Alpha)*sin(Gama)];
B= [0 0 log(t+1)+sin(t)./(t+1)].';
fsolve(A-B)
but let's try to learn the simplest first.
I need to get expressions for a(t), b(t) and c(t).
I believe there's no exact solution, so, it could be an approximated solution, since it returns expressions Alpha(t), Beta(t) and Gama(t).
How do we do Matlab solve it?
Thanks, very much
回答 (2 件)
Torsten
2015 年 6 月 19 日
Add the equations
dalpha/dt=alphadot
dbeta/dt=betadot
dgamma/dt=gammadot,
to your system, substitute
dalpha by alphadot
dbeta by betadot
dGama by gammadot
d2alpha by dalphadot/dt
d2beta by dbetadot/dt
d2Gama by dgammadot/dt
in your equations and use ODE15i to solve.
Best wishes
Torsten.
1 件のコメント
Marlon Saveri Silva
2015 年 6 月 19 日
Marlon Saveri Silva
2015 年 6 月 19 日
1 件のコメント
Torsten
2015 年 6 月 22 日
I already included the way how to deal with 2nd order derivatives in my reply .
If you have the equation
f(t,y,y',y'')=0,
replace it by the two equations
y'-y1=0;
f(t,y,y1,y1')=0
Best wishes
Torsten.
カテゴリ
ヘルプ センター および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!