MATLAB Answers

How can I integral this equation and plot? please help me

2 views (last 30 days)
jameslk on 16 Jun 2021
Commented: jameslk on 16 Jun 2021
dy/dt = y*t^2 + 3*y
y(0) = 1
t= 0:2
This is the equation which I want to integral
But when I integrate and plot this how can I get dy/dt. Because dy/dt becomes y when i intergrate it.
jameslk on 16 Jun 2021
yes i want to plot that equation after integral
and how can i get integral constant?
I don't have idea to do this with function int or integral

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 16 Jun 2021
syms y(t) c
eqn = diff(y) == y*t^2 + 3*y
eqn(t) = 
ic = y(0) == 1
ic = 
sol = dsolve([eqn, ic])
sol = 
fplot(sol, [0 2])

Community Treasure Hunt

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

Start Hunting!