Consider the Initial value problem: t dy dt + y = 2t, y(1) = c
- Solve it using dsolve.
- Evaluate the solution with c= 0.7 at t= 0.01, 0.1, 1, 10. Repeat for c=1 and c=2.1.
- Plot the solutions with c= 0.7, 0.9, 1.1, 1.5, 2.1 on the same graph on the interval (0,2.5).
heres what ive tried
syms c y(t)
dsolve(diff(y)==(2*t-y)/t,y(.01)==.7)
dsolve(diff(y)==(2*t-y)/t,y(.1)==0.7);
dsolve(diff(y)==(2*t-y)/t,y(1)==0.7);
dsolve(diff(y)==(2*t-y)/t,y(10)==0.7);
everytime ive tried to plot it says MATLAB cant change double from sym. I am not really sure how to approach this problem, or if what I have tried is correct.