Solving non-linear equations simultaneously with DE's using Euler integration

Jigby
Messages
2
Reaction score
0
I have 15 equations with 15 unknowns describing a dynamic process. I would like to know how I can conbine solving non-linear equations together with ordinary differential equations (1st and 2nd order) simultaneously, without using ode45, but Euler's method.
 
Physics news on Phys.org
Jigby said:
I have 15 equations with 15 unknowns describing a dynamic process. I would like to know how I can conbine solving non-linear equations together with ordinary differential equations (1st and 2nd order) simultaneously, without using ode45, but Euler's method.

Why would you want to do that? Are you doing a real time application or something or a homework question. Do you require very fast integration? Anyway, you can always write your own function. Euler's method is pretty basic.
 
Thanks John, I will try that!
My program is based the dynamic response of a system in the time domain. It was for an assignment last year, but I never quite got it to work so I thought I would try again. My prof told us ODE 45 would not work, he didn't say why though.
 
Jigby said:
Thanks John, I will try that!
My program is based the dynamic response of a system in the time domain. It was for an assignment last year, but I never quite got it to work so I thought I would try again. My prof told us ODE 45 would not work, he didn't say why though.

Did he say the Eular's method would work? If so I'm surprised. You know that you can give ODE45 a set of points to calculate the state values at.
 
John Creighto said:
Did he say the Eular's method would work? If so I'm surprised. You know that you can give ODE45 a set of points to calculate the state values at.

i agree with John,and whether you eqtion a stiff one?
 
Yeah, MATLAB has some stiff solvers as well. One thing that could happen with ODE45 is it could take too long to integrate if it ends up needing to take too small a step size to get the required error tolerance. One way to get around this is to decrease the error tolerances in ODE45. Eular's method may get you a solution but I don't know how you can be sure it is sufficiently accurate.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top