1st order differential equation

14 visualizaciones (últimos 30 días)
Takey Asaad
Takey Asaad el 14 de Sept. de 2018
Comentada: Torsten el 14 de Sept. de 2018
i am trying to solve this differential equation and the solution i get it is wrong so where is the error? and this my function dy/dt=k*y*ln(450/y) y(0)=40 and y(15)=95 and k is constant and this my MATLAB
tspan = [0 300];
y0 = 40;y15=95;
[t,y] = ode45(@(t,y) 'k'*y*exp(450/y), tspan, y0,y15);
plot(t,y,'-o')

Respuesta aceptada

Takey Asaad
Takey Asaad el 14 de Sept. de 2018
Hi , the plot is still wrong , k should be get from the initial condition and the solution is y(t)=450/( e^e^(-0.02948t+0.8839) so how can i get this by MATLAB
  1 comentario
Torsten
Torsten el 14 de Sept. de 2018
Please show the code you are using.

Iniciar sesión para comentar.

Más respuestas (1)

Torsten
Torsten el 14 de Sept. de 2018
Editada: Torsten el 14 de Sept. de 2018
This is a boundary value problem - use "bvp4c" instead of "ode45".
Or try "dsolve".
Best wishes
Torsten.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by