Differential Equation Matlab Resolve

조회 수: 1 (최근 30일)
Alexmm
Alexmm 2014년 7월 14일
답변: Andrei Bobrov 2014년 7월 15일
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)=??

답변 (2개)

Andrei Bobrov
Andrei Bobrov 2014년 7월 15일
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);

MiguelMauricio
MiguelMauricio 2014년 7월 15일
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

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by