ngrh
2024
PIIYSICS IIONOURS PRACTICAL
Paper : CC-8P
Full Marks : 30
[lixpcritncnt : 20, Laboratory Notebook : 05, Viva voce : 05]
Day - 111
Answerany one question.
t. (a) Verifythat
e (—ar24bxæc)
4a
a
You may take a = 1, b = 2, c = 1. Use appropriate SciPy function. Plot the integrand v.ithin the
domain [—5,5].
code : 6, Plot : 2, Total : 8
(b) The motion of a pendulum is described by the following differential equation :
d 20 + —sin
— g 0 = 0, 0 < t 2
Write a Python program to solve the above differential equation using suitable function from SciPy
module. The initial conditions are given as O(t= 0) = E, Take L=O.3m,
10 dt
g = 9.8 m/s2. Plot Ovs.— within the given domain.
dt
code : 8, Plot : 4, Total : 12
2. (a) Write a Python program to solve the following differential equation :
dy _ x2 + y 2
dx xy
Use Odeint package from SciPy. The exact analytical solution is given by 21n(x)+1 .
Plot the numerical solution and the exact solution in the same graph within the given domain.
code : 6, Plot : 2+2, Total : 10
(b) The Fourier expansion of a given function F(x) periodic over interval [—1,
IJ can be written as
nzx + bn sin nzr
a cos
where a
1
f(x)cos — dx, n=01 23 ...n
1 nr-r
— f (x) sin — dx,
-1
Analyse the Fourier series of a Sawtooth wave. Evaluate the Fourier coefficients and print first
5 coefficients. Plot the constructed series with the given periodic function.
Code : 7, Plot : 3, Total : 10
(a) WIÅtea Python program to evaluate the integral where Pn(x) signifies the
I.egendte polynomial. Keep 'm' and 'n' as input parameters.
C01nputethe integral for (m, n) —(2, 3). (3, J). (j, (4, 4). Plot Pn(x) vs. x within x c (—1,I) for
any four ditlercnt It-values of your choice in the samc graph.
Codc : 6, Plot : 4, Total • 10
(b) Write a program to solve the I-I) Diffusion equation .
D
at av2
D = 1.0
= sin x, 0 <xS7t Initial Condition
O, Vt Boundary Condition
Space domain : x e [0, It], Time domain : t e [0, 2.01
Plot U'(x,t) with respect to x for any two different time instants within [0, 2].
Program : 8, Graph : 2, Total : 10
4. (a) Write a Python program to evaluate the first
three Fourier coefficients in the Founer expansion of
Plot the constructed scries and the origin function in the same graph.
Fourier expansion of a given function ax) periodic over interval [J can he written as
nmv nar
an COS +bnsin
an = —
nxr
where
-1
1
cir,
code : 6, Plot : 2-2, Total
(b) Solve the 2-D Laplace's equation inside a region 0 S x < and 0 S y S 2N:
ö 2v ö2v
öx2 0 2
with the following boundary conditions :
V(x, 0) = 0, = sin(x)
Using appropriate SciPy module, write a Python program to solve the above equation (or the given
boundary conditions. Plot V(x,y) vs. y for a fixed x = 1.5.
Code : S, Plot : 2, Total : ID
5. (a) Write a Python program to
solve I-D wave cquation
ö 2U ö 2tJ
öx2
U(x,0) =
öt
Plot the numerical solution UA(x,t) with respect to x for two different time instants t (O t C 20).
Code : 10, Plot : 2, Total : 12
(b) To calculate the work done against gravity to take a mass to escape the Earth's gravitational field.
one needs to perform the following improper integral :
—2 dr
Write a Python program to compute this integral using appropriate SciPy module. Take = l, ro = I.
Also, evaluate the above integral, taking the upper limit as : 10, 50, 100 and compute the deviation
of the results from I.
Code : 2+2+2+2, Total : S
(6)
6. (a) Verify the relation :
ö(x — = f (a),
using the limiting representation of Dirac-Deltafunction,
lim 2 , by gradually increasing the value of n.
(x—a)
Take, f (x) = x and a = 2. Plot ö(x—a) vs. x for three values of n. Set appropriate axes labelling
and put legend in the graph.
Program : 6, Graph : 4, Total : 10
(b) Write a Python program to solve the following differential equation :
2 dy
d y
3x 2 ISx S5
dy
for y(l)=4 and —
dx
Use Odeint package from SciPy. The exact solution is given by ye(x) = x+ 3.v3 . Plot the numerical
solution and the exact solution in the same graph within the given domain.
Code : 6, Plot : 2+2, Total : 10