We have moved to @ Placement Papers Hub !! Visit our new website here for more..

MATLAB Solving First Order Ordinary Differential Equation using Built-in Functions;

MATLAB Solving First Order Ordinary Differential Equation using Built-in Functions


Syntax:-
S = dsolve(eqn)
S = dsolve(eqn,cond)
S = dsolve(eqn,cond,Name,Value)
Y = dsolve(eqns)
Y = dsolve(eqns,conds)
Y = dsolve(eqns,conds,Name,Value)

clc;

clear all;
close all;
a=dsolve('Dy=2*y+t');
disp(a);

b=dsolve('D2y=2*y+t','y(0)=1,Dy(1)=1');
disp(b);

(C3*exp(2*t))/4 - t/2 - 1/4

(2*2^(1/2)*exp(2^(1/2)) - 3)/(exp(2^(1/2)*t)*(2*2^(1/2)*exp(2^(1/2)) + (2*2^(1/2))/exp(2^(1/2)))) - t/2 + (exp(2^(1/2)*t)*((2*2^(1/2))/exp(2^(1/2)) + 3))/(2*2^(1/2)*exp(2^(1/2)) + (2*2^(1/2))/exp(2^(1/2)))