You are on page 1of 13

Solution of Ordinary Differential Equations by using

MATLAB
A Subject Specific Project Report Submitted in partial fulfilment of the requirements of the

Course on Mathematics-I (BTBS-T-BS-111)

of

Bachelor of Technology (B. Tech)

Submitted by
(------------)

Under the Guidance of


Dr. -----------
Professor, Dept. of BSH (Mathematics)

DEPARTMENT OF BASIC SCIENCE AND HUMANTIES

GANDHI INSTITUTE FOR TECHNOLOGY(GIFT)

AUTONOMOUS, BHUBANESWAR

Affiliated To

BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA

1|Page
CERTIFICATE

This is to certify that the mini-project entitled “SOLUTION OF

ORDINARY DIFFERENTIAL EQUATION BY USING MATLAB” has

been carried out by ---------- and completed under my guidance and the

project meets the academic requirement of the subject Introduction to

Mathematics-I (BTBS-T-BS-201).

Signature of the Guide

2|Page
TABLE OF CONTENTS

Sr. No Contents Page No


1 Title 1
2 Certificate 2
3 Acknowledgement 4
3 Abstract 5
4 Literature Survey 6
5 Introduction 7
6 Problem Statement 8
7 Method (Experimental) 9-10
8 Result and Discussion 11
9 Credit Author 12
10 Conclusion 12
11 References 13

Acknowledgement
3|Page
I would like to express my deep sense of gratitude to my Guide Dr. Pallab

Kumar Kar, Prof. Pranati Mishra, HoD, Department of Basic Science &

Humanities and Prof. Bismita Manjari Biswal, First Year Coordinator for

extending their support in compiling this project.

I am also equally thankful to Dean Academics Sir and Principal Sir for all the

timely help and guidance, without them the completion of this project would

not have been possible.

Last but not the least; I would be failing in my duty if I don’t mention the

names of the members of my family and friends for their ungrudging support

and encouragement in giving a facelift to this project.

4|Page
ABSTRACT

MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-


paradigm programming language and numeric computing environment
developed by MathWorks.

MATLAB allows matrix manipulations, plotting of functions and data,


implementation of algorithms, creation of user interfaces, and interfacing with
programs written in other languages.

Although MATLAB is intended primarily for numeric computing, an optional


toolbox uses the MuPAD symbolic engine allowing access to symbolic
computing abilities.

5|Page
LITERATURE SURVEY

MATLAB was invented by mathematician and computer programmer Cleve


Moler. The idea for MATLAB was based on his 1960s PhD thesis. Moler
became a math professor at the University of New Mexico and started
developing MATLAB for his students as a hobby. He developed MATLAB's
initial linear algebra programming in 1967 with his one-time thesis
advisor, George Forsythe. This was followed by Fortran code for linear
equations in 1971.

Before version 1.0, MATLAB "was not a programming language; it was a


simple interactive matrix calculator. There were no programs, no toolboxes, no
graphics. And no ODEs or FFTs."

The first early version of MATLAB was completed in the late 1970s. The
software was disclosed to the public for the first time in February 1979 at
the Naval Postgraduate School in California. Early versions of MATLAB were
simple matrix calculators with 71 pre-built functions. At the time, MATLAB
was distributed for free to universities. Moler would leave copies at universities
he visited and the software developed a strong following in the math
departments of university campuses.

In the 1980s, Cleve Moler met John N. Little. They decided to reprogram
MATLAB in C and market it for the IBM desktops that were replacing
mainframe computers at the time. John Little and programmer Steve Bangert re-
programmed MATLAB in C, created the MATLAB programming language,
and developed features for toolboxes.

6|Page
INTRODUCTION

In mathematics, the term “Ordinary Differential Equations” also known as ODE is an


equation that contains only one independent variable and one or more of its derivatives with
respect to the variable. In other words, the ODE is represented as the relation having one
independent variable x, the real dependent variable y, with some of its derivatives.

y’, y”, ….yn ,…with respect to x.

Applications
ODEs have remarkable applications and it has the ability to predict the world around us. It is
used in a variety of disciplines like biology, economics, physics, chemistry and engineering.
It helps to predict the exponential growth and decay, population and species growth. Some of
the uses of ODEs are:

 Modelling the growth of diseases


 Describes the movement of electricity
 Describes the motion of the pendulum, waves
 Used in Newton’s second law of motion and Law of cooling

7|Page
PROBLEM STATEMENT

Differential Equation are important because for many physical system, one can,
subject to suitable idealization, formulate a differential equation that describes
how the system changes in time. Understanding the solutions of the differential
equations is then of paramount interest.

The problem statement of the first order differential equations is to find the rate
of change of system.
Let’s take an example as;
dy 2
=−2 x + x− y
dx

8|Page
METHOD (Experimental)

1. clc: Clears the command window for a clean display.


2. clear all: Clears all variables from the workspace.
3. close all: Closes all open figures to start with a clean slate.
4. f = @(x, y) (-2 * x^2 + x - y);: Defines an anonymous function representing the ODE
dy/dx = -2*x^2 + x - y.
5. [x, Y0] = ode45(f, [0 4], 2);: Solves the ODE using the ode45 solver with initial
condition y(0) = 2, and stores the time and solution vectors in x and Y0.
6. plot(x, Y0);: Plots the solution Y0 against x.

9|Page
MATLAB Program
Matlab Code for the given ode equation

clc;
clear all;
close all;
f=@(x,y)(-2*x^2+x-y);
[x,Y0]=ode45(f,[0 4],2);
plot(x,Y0)

10 | P a g e
RESULTS AND DISCUSSION

11 | P a g e
CONCLUSION
There is various method to solve ordinary differential equations such as by

1.General solution of linear differential equation

2.Linear differential equation of first order

3.Method of separation of variables

4.Method of integrating factors

But this process required time and patience to solve the problem. So, by
using MATLAB we can easily solve the ordinary differential equations. As
a result, it will be time consume and will enhance the skill. So, the
programmer has been developing the MATLAB program and it will help
to solve different types of mathematical problem and along with the daily
life problem.

12 | P a g e
REFERENCES

1. http://www.irrodl.org/index.php/irrodl/article/view/851/1594
2. https://r.search.yahoo.com/
_ylt=AwrKDuJBcHNlaGITrhe7HAx.;_ylu=Y29sbwNzZzMEcG9zAzEEdnRpZAMEc2
VjA3Ny/RV=2/RE=1702092993/RO=10/RU=https%3a%2f%2fen.wikipedia.org
%2fwiki%2fMATLAB/RK=2/RS=v7vv_CQGnt83ZpGEzrwGR63S4P8-
3. https://www.mathworks.com/products/matlab.html
4. Matlab online compiler.
5. Help of Teachers.

13 | P a g e

You might also like