-1

Can I use this form when i need to solve system of ODE by ode45 on MATLAB

dy(3)=dy(1)*dy(2)+y(3)*y(2) 

I mean is my expression correct?

For example how can I solve this:

dy(3)=dy(1)*dy(2)+y(1)
dy(2)=dy(1)-y(2)
dy(1)=dy(2)+dy(3)/y(1) 

initial conditions are :

y(1)=1
y(2)=0
y(3)=0
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174

1 Answers1

1

MATLAB solves ordinary differential equations of the form dy/dt = f(t,y), your differential equation is fully implicit, of the form f(t,y,dy/dt) = 0. You can only solve it using ode15i. For more information, refer to the documentation on Ordinary Differential Equations and ode15i.

am304
  • 13,758
  • 2
  • 22
  • 40
  • thanks alot for reply , can you explain more for me with thanks – user3234456 Jan 26 '14 at 10:06
  • Not really, no. Read the documentation, examples are provided. Have a go and if it doesn't work, pose another question, this time with your code, error message and data to make the error reproducible. See http://stackoverflow.com/help/mcve for how to ask a good question. – am304 Jan 26 '14 at 14:10