solving non linear differential equations

I am working at a mathematical problem and I wanted to solve it numerically through MATLAB. The equation has the form:
epsilon*y'(t) =t*y(t)(y(t)-a)(y(t)-b)+c
where a<0 and b>0 and c>0

 Respuesta aceptada

Torsten
Torsten el 7 de Feb. de 2019
Editada: Torsten el 7 de Feb. de 2019

0 votos

a = -0.2;
b = 0.1;
c = 0.1;
epsilon = 1.0;
fun = @(t,y)(t*y*(y-a)*(y-b)+c)/epsilon;
tspan = [0 3.5];
y0 = 0;
[T,Y] = ode45(fun,tspan,y0);
plot(T,Y)

4 comentarios

berrabah imad eddine
berrabah imad eddine el 7 de Feb. de 2019
Thank you for your help, but are you sure for you answer, could you explain more the method of your work, please.
Torsten
Torsten el 7 de Feb. de 2019
Take a look at how ODE integrators are invoked:
help ode45
berrabah imad eddine
berrabah imad eddine el 3 de Mzo. de 2019
Would you change this algorithm to Runge Kutta algorithm, pleas?!
a = -0.2;
b = 0.1;
c = 0.1;
epsilon = 1.0;
fun = @(t,y)(t*y*(y-a)*(y-b)+c)/epsilon;
tspan = [0 3.5];
y0 = 0;
[T,Y] = ode45(fun,tspan,y0);
plot(T,Y)
Torsten
Torsten el 4 de Mzo. de 2019
ODE45 is a Runge-Kutta integrator ...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 6 de Feb. de 2019

Comentada:

el 4 de Mzo. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by