Week 3 - Solving second order ODEs
AIM:- to perform to solve second order ODE by using Matlab software
introduction;
A second-order ordinary differential equation is an ordinary differential equation in which any derivatives with respect to the independent variable have an order no greater than 2.
the ordinary differential equation helps us to solve many engineering systems. Such as harmonic motions, vibrations, damping, etc.
the second-order linear differential equation is used to model many systems in engineering.
let's consider
A simple pendulum consists of a mass "m"
hanging from a string of length "L"
from a fixed pivot point.
When displayed to an initial angle "`θ` and released.
the pendulum swings forward and backward with periodic motion.
The equation is given by: is to solve the 2d odes equations

Explanation of the code
input are taken as given in problem
L=1 meter,
m=1kg,
b=0.05;
g=9.81 m/s^2
initial conditions taken as
Angular diaplacement =0,angular Velocity=3rad/sec,at time t=o
the motion is stimulated b/w 0-20 sec
solving ODE
ode solver ode45 is used in this Matlab program. The result is stored in an array of row matrix of two columns, for the value of displacement and velocity at different time periods,
ode-func is the function made to solve the given equation. where the assumptions are made in the form of code.
Figure(1)
plotting
the graph is plotted to get the waveform of the displacement and the velocity form from the initial conditions

FIGURE(2)
plotting
animating the transmit motion of the simple pendulum
to perform this operation we use for loop as the bob moves with a velocity and displaces for the different time of periods.And recorded it and animated the path of the oscillator
errors faced
we face the errors when we not using the hold on &hold off command in correct setup,
and at the pause code give the proper value
and give x0=0,y0=0,
and determine x1 andy1 values
main program
