You are on page 1of 23

NAME – ASHESH KUMAR GUPTA

ROLL NO – 001920701091

CLASS – UG-II (PHYSICS)


ASSIGNMENT 5

Numerical Differentiation

EXPERIMENT 1

A rocket moves in space and traverses a distance s in time t as given


below.

Find velocity and acceleration of the rocket at t = 3 sec.

ASNWER

Forward Difference Table:


t s Δs Δ2 s Δ3s Δ4s
0 0 Δy0=75 Δ2y0=750 Δ3y0=750 Δ4y0=0

5 75 Δy1=825 Δ2y1=1500 Δ3y1=750

10 900 Δy2=2325 Δ2y2=2250

15 3225 Δy3=4575

20 7800

From the above Forward Difference Table: h = 5


Calculating s (t) from Newton Forward Interpolation Formula with the
help of values from Forward Difference Table:

At t = 3 s; S (3) = -3 m

Calculating First Derivative of position i.e. Velocity at t = 3 s from Known


Formula of Newton Forward Interpolation Formula:

Calculating the Second Derivative of position i.e. Acceleration at t=


3s from Known Formula of Newton Forward Interpolation Formula:

Therefore, the velocity and acceleration of the rocket at t = 3 s is


respectively: 17m/s and 18m/s2
EXPERIMENT 2:
A particle of mass “m” is acted on by a force whose potential energy V
corresponds to different positions is given below in a tabular form.

• Construct a forward difference table and find the potential


energy V as a function of x.

• Using the difference table find the positions of the equilibrium


points.
• Find also whether the equilibrium points are stable, unstable or
neutral.

Discuss the type of motions which may occur.

ANSWER:

Forward Difference Table:


x V ΔV Δ2V Δ3V Δ4V Δ5V
-1.0 6.00 Δy0=-4.75 Δ2y0=3.5 Δ3y0=-1.5 Δ4y0=0 Δ5y0=0
-0.5 1.25 Δy1=-1.25 Δ2y1=2.0 Δ3y1=-1.5 Δ4y1=0
0.0 0.00 Δy2=0.75 Δ2y2=0.5 Δ3y2=-1.5
0.5 0.75 Δy3=1.25 Δ2y3=-1.0
1.0 2.00 Δy4=0.25
1.5 2.25

From the above Forward Difference Table: h = 0.5


• Utilizing Newton Forward Interpolation Formula to find V as a
function of x:

• Using the difference table to find the positions of the equilibrium


points, In order to do the above, we will calculate the First
Derivative of the Potential Function and equate it to Zero in order
to locate the points of extremum (Maxima/Minima):

We obtain as the positions of the equilibrium points.

• In order to find the nature of the equilibrium points i.e. whether it


is a stable, unstable or neutral position we will further calculate
the second-derivative of the Potential Function and check its
magnitude at the values of x = 0, 4/3 and then infer about the
nature of the equilibrium at that particular position.

NOTE:

At x = 0; we obtain .

At x = 4/3; we obtain .

• The position of stable equilibrium can be visualized physically as a


marble at the bottom of a bowl which experiences a restoring
force when displaced from its equilibrium position.

The position of unstable equilibrium can be visualized physically as the


same marble but now at the top of a hemispherical bowl. Upon
application of a force on the marble, it will tend to fall and roll down
along the surface of the hemisphere and never return to its previously
occupied equilibrium position even after the removal of the external
force.
Numerical Integration

EXPERIMENT 3:
Write a program using trapezoidal rule to compute the moment of
inertia of an elliptic lamina of mass 1 kg, as shown in the figure, about
y-axis. Equation describing the elliptic lamina relative to centroidal
axes is:
𝟐 𝟐

Extend your program to compute the moment of inertia of the


lamina about y’-axis. Take a=1 m.

Note that semi-major and semi-minor axes are given in cm.

ANSWER:

Given equation of the ellipse:


Clearly the above mentioned ellipse is a horizontal ellipse because a > b
and clearly:
a = Length of Semi-Major Axis = 14 cm b =
Length of Semi-Minor Axis = 8 cm
Given mass of the elliptical lamina => m = 1 kg

Computing the Moment Of Inertia of the Elliptic Lamina about Y-


Axis:

Considering Elemental Area 𝑑𝐴=𝑦𝑑𝑥; Where 𝑦 =𝑓(𝑥) From the


Equation of the Ellipse:

Therefore, the Elemental Area:


CODE

FOR THE INTEGRATION FUNCTION PROBLEM NAMED: inte.f90


FOR THE PROGRAM FUNCTION CODE: prob1.f90

COMPLILATIONS and OUTPUT


DISCUSSIONS.

1. The total inertia of momentum along the y-axis is given by the


formula proved above –

Therefore,

2. It can be shown that larger the value of h, more is the error in the
calculations. So, to reduce the value of h, we have taken the value of n so
high, the intervals [a,b] are divided into smaller terms and error margin is
reduced.

Computing the Moment of Inertia of the Lamina about Y’-Axis:


Upon Application of Parallel Axis Theorem to the Elliptical Lamina we
obtain the Moment of Inertia of the Elliptical Lamina about Y’-Axis:

Given: m = 1 kg, a = 1 m = 100 cm and we obtained:


𝐼𝑌 =8619.37640 𝑘𝑔 𝑐𝑚2
FOR UPDATED INTEGRATION CODE :
OUTPUT

`
EXPERIMENT 4:

Write a program to compute magnetic field at different points along


z-axis due to a circular loop of conductor carrying a steady current i.
The circular conducting loop is placed on the x-y plane.

Take radius of the loop as 0.5 m. For convenience current flowing


through the loop is chosen such
that μ0i = 1.

• Plot a graph showing the


variations of magnetic field with
the distance along z-axis from
centre of the loop.

• Compare your results with


the exact value given by

Where r is radius and z is distance along z-axis from centre of the


circular loop.
ANSWER:

Given, a circular loop of conductor is carrying a steady current “i”.


The conductor is placed on the X-Y Plane, and its radius is given as 0.5
m. We shall compute the magnetic field at different points along z-axis
due to the conductor (for points on the axis). For convenience given μ0i
= 1.
The Analytical Result is given by:

• The above problem involves the application of Biot-Savart Law:

Using Biot-Savart Law, it can be shown the expression of B can be


written in the form

The components of B in x and y direction can be shown to be zero by the


following codes
FIRSTLY,

The CODE for the Integration is given by: inte.f90


The program code for B in x direction is given by

(For

COMPLILATIONS and OUTPUT

Which is almost equal to zero ( It is the Amstrong units)


The value of B in y direction is given by

COMPLILATIONS AND OUTPUT

Which is also almost equal to zero. A smaller unit of h might as well give us exactly
equal to zero.
Now, for the Z-Component, we obtain:

So the source code,

OUTPUT
So, the above equation for B-z becomes

Therefore, the Final Value of B is:

OUTPUT
Therefore, at Z = 0.5 m; Bz = 0.37024109808637412 T

GRAPHS
• Plotting the graph showing the variation of magnetic field
with the distance along Z-axis from center of the loop (z=0)
with the help of the Analytical Formula and the
Numerically obtained values by varying the values of Z
across both the formula and comparing the results
obtained in the final plot.

• ANALYTICALLY OBTAINED PLOT ONLY:
DISCUSSIONS:

1. We can compare the difference of the plots between the


values of Bz by combining the graphs between Analytical
and Numerical Solutions.

COMBINED PLOT:

As we can see that the graphs obtained by comparing is nearly


same which proved the numerical integrations worked out
above have not led to any deviation from the actual value.
There might be some discrepancies when zoomed but that is
only due to uncertainties in the last decimal places.

You might also like