Question: Use dsolve to solve this equation: y' − y = 2 sin(t).
Below is the code I used but I do not think I am getting the right answer.
syms y(t);y = dsolve(diff(y) == 2*sin(t)+y)
dsolveSymbolic Math Toolbox
syms y(t);y = dsolve(diff(y) == 2*sin(t)+y)
Best Answer