0% found this document useful (0 votes)
103 views2 pages

AE610a Assignment: Matlab Code For Solving The Above Ode Using Ode45 Solver

The document summarizes solving a third order differential equation using MATLAB. It presents the differential equation, initial conditions, and defines the variables y1, y2, y3 to represent f, f', f''. It then writes the MATLAB code to define the derivative function and use the ode45 solver to generate a plot of the solution f(η) vs η using the initial conditions.

Uploaded by

nimishk92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views2 pages

AE610a Assignment: Matlab Code For Solving The Above Ode Using Ode45 Solver

The document summarizes solving a third order differential equation using MATLAB. It presents the differential equation, initial conditions, and defines the variables y1, y2, y3 to represent f, f', f''. It then writes the MATLAB code to define the derivative function and use the ode45 solver to generate a plot of the solution f(η) vs η using the initial conditions.

Uploaded by

nimishk92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

AE610a

Assignment
Submitted by : Nimish Kumar(11467)




Q. Solve 3
rd
order differential equation f+0.5ff=0
Initial conditions:- f(0)=0
f(0)=0
f(0)=0.332

Solution:
Let
y1=f
y2=f
y3=f

Now differentiate each above equation
y1=y2
y2=y3
y3=0.5*y1*y2

MATLAB CODE FOR SOLVING THE ABOVE ODE USING ode45 SOLVER:

% Function for finding the derivatives in matrix form
function dydx= ode3ord(x,y)
dydx=[y(2)
y(3)
-0.5*y(1)*y(2)];

% Function for ode solver using ode45
function [T,Y] = TB(t0,tf,f0,fdot0,fdotdot0)
[T,Y] = ode45('ode3ord',[t0 tf],[f0 fdot0 fdotdot0]);
plot(T(:,1),Y(:,2));
end;


In above code, [t0 tf] is span in which ode solver will solve the differential equation
[f0 fdot0 fdotdot0] is the value of f, f,f














Plot for f() vs




Plot for f(n)or u/U vs

You might also like