How to solve DE by matlab

3 visualizaciones (últimos 30 días)
Christina Kao
Christina Kao el 13 de En. de 2017
Respondida: Roger Stafford el 13 de En. de 2017
Please help to solve the differential equation dy/dt = y(1-y) with t=0 out to time t=5. Do this numerical integration using 10 time steps (step size of 0.5). Also, make a plot showing the analytical solution, and the estimates obtained using the Euler.

Respuestas (2)

halleyhit
halleyhit el 13 de En. de 2017
Usually, ode45, ode23 and some other commands can solve DE. However I think in this homework, you should code yourself.

Roger Stafford
Roger Stafford el 13 de En. de 2017
I can help you a little in finding the analytic solution. Temporarily consider that y is the independent variable and t is the dependent variable, which would give you the equation:
dt/dy = 1/(y*(1-y))
Integrating with respect to y while making use of partial fractions would lead to:
log(abs(y/(1-y))) = t + C
where C is an arbitrary constant of integration. You would need some initial condition to find its value. The final step would then be to solve this equation for y in terms of t.

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