how to find analytical solution of the following ode in matlab

Question : Find analytical solution of the following ode in matlab\[\frac{dx}{dt} = 1+t-2x, x(0) =0\]Solution :%matlab program to find analytical solution of the ode dx/dt =1+t-2x subject to initial condition x(0) =0syms x(t)dxdt = diff(x)+2*x == 1+t; % ODEx0 =…

This Question has been answered. 

Please Login or Register to See The Answer