Differential Equation Matlab Resolve
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, I can not resolve / implement the follow differential equation. Is there anyone who can help me??
y''(t)+p(t)y'+q(t)y=0
q=1/(1+t)^2;
p=1+q;
y(0)=1; y'(0)=0; y''(0)=0; ------> y'(4*pi)=??
0 commentaires
Réponses (2)
Andrei Bobrov
le 15 Juil 2014
Your odefun - funnn:
function dy = funnn(t,y)
q = 1./(1+t).^2;
dy = [ y(2);
-((q + 1).*y(2) + q.*y(1))];
end
solve:
sol = ode45 (@funnn, [0 20], [1 0]);
out = deval(sol,4*pi,2);
0 commentaires
MiguelMauricio
le 15 Juil 2014
Try using dsolve
syms y(t) t
q=1/(1+t)^2;
p=1+q;
Dy=diff(y);D2y=diff(y,2);
solution=dsolve(D2y+p*Dy+q*y==0,Dy(0)==0,y(0)==1,t)
In any case, your last initial condition (y''(0) must be wrong since the equation would not hold. For t=0 you would have 0 + 2*0 + 1*1=0
0 commentaires
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!