Posts

Showing posts with the label Exp 5

Solution of ordinary differential Equation

Image
  OBJECTIVE To solve ordinary differential Equation LEARNING OUTCOMES After the completion of this experiment students will be able to solve   ordinary differential Equation SOFTWARE USED:                  MATLAB ® R2017a   1. Solve the first order differential equation With initial condition x(0)=1 Program syms x(t); eqn= diff(x,t)+ 2*x ==0; cond= x(0)==1; soln= dsolve(eqn,cond) t=0:0.05:10 s=subs(soln) plot(s) title('Response of firt order differential equation') xlabel('time') Output soln = exp(-2*t) 2. solve second order differential equation Program syms x(t) ; eqn= diff(x,t,2) + 2*diff(x,t) + 2*x   == exp(-t); soln= dsolve(eqn); soln=simplify(soln) OUTPUT soln =  exp(-t)*(C4*cos(t) + C5*sin(t) + 1)   3. Solve the differential equation cos(2*x)-y y(0)=1 y’(0)=0 PROGRAM syms y(x) Dy = diff(y); ode = di...