MATLAB Answers

0

Second Order Differential Equation

Asked by Cristina Sofroniei on 21 Jun 2019 at 11:17
Latest activity Commented on by Cristina Sofroniei on 21 Jun 2019 at 11:33
y''+3y'-6=0
y(0)=2
y'(0)=3
I have to solve this equation.
Just got an exam today from it and I couldn't solve it, so I failed it.
I have to build the algorithm to get it, but because I'm new to it so I don't know to do this.
->>> Did something really wrong that I didn't get any resoult.
And if you could show me more examples of this types of equations and how I cand solve them, it would be great. I can't really get them.
Thank you very much for your help!
function dy=test(t,y)
dy=zeros(2,1);
dy(1)=y(2);
dy(2)=y(1)+3.*y(2)-6;
end

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 21 Jun 2019 at 11:25
Edited by madhan ravi
on 21 Jun 2019 at 11:25
 Accepted Answer

https://in.mathworks.com/help/matlab/ordinary-differential-equations.html - there are plenty of examples there , you were so close by the way , I’m pretty sure you’re capable of learning once you go through that link

  1 Comment

I can't thank you enough for your answer.
I hope I'll manage to learn it.
Thank you very, very much!

Sign in to comment.