How to solve a non-linear equation where each element of the array is a parameterized function?
Mostrar comentarios más antiguos
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
Respuestas (2)
Torsten
el 19 de Jun. de 2015
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 comentario
Marlon Saveri Silva
el 19 de Jun. de 2015
Marlon Saveri Silva
el 19 de Jun. de 2015
1 comentario
Torsten
el 22 de Jun. de 2015
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.
Categorías
Más información sobre Systems of Nonlinear Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!