Statistical Mechanics Practical Guide
Statistical Mechanics Practical Guide
/CBCS/Day-3
2024
PHYSICS HONOURS PRACTICAL
Paper : CC-12P
(Statistical Mechanics)
Full Marks : 30
Day- 3
Answer any one question.
1. (a) Using appropriate NumPy function, drawa random sample of size 100 having Uniform Distribution
in the interval (0,1]and plot the corresponding distribution as histogram. Calculate the autocorrelation
function (r) of the random sample as a time series for time lag k= 10 and k = 50.
(b) Define the Gaussian Error function in the real domain dt using Monte Carlo
method of geometric area estimation in rectangular grid over uniform random sampling. Hence plot
erf(x) for -3 <x<3. What is the significance of error function? 8+12
2. (a) Using appropriate NumPy function, draw a random sample () of size 10000 that is normally
distributed with mean value 0 and standard deviation Define a function f(x) as the probability
V2
that y fall in the range [-x, x]. Hence plot f(r) for 0 Sxs3. What is the significance of the
function f()?
(b) Using central limit theorem (CLT), generate a Gaussian distribution from the uniform distribution
[0,1) of random numbers of sample size 1000. Determine the values of mean and variance of the
distribution so obtained. Plot the normalized histogram of this distribution, along with corresponding
theoretical probability density function with same mean and variance. 12+8
(0904)
(2) B(Sth Sm.,)-Physics-HPr/CC-12P/Inst/CBCS/Day-3
3. (a) A single trial of a random experiment is tossing a biased coin (p = probability of getting head in
atoss) mtimes. Simulate an experiment consisting of Nsuch trials. Plot the total number of Heads
obtained per trial in a histogram. Also plot the corresponding binomial distribution in the same
graph. (Take the values of p=0.4, m =20 and N= 1000 as runtime parameter.)
(b) Using appropriate NumPy function, draw a random sample of size 1000 having Exponential
Distribution f(x; 2)= he in the interval [0, o) with rate parameter A=0.1 and plot the
corresponding distribution as normalized histogram. Determine the mean and variance of the
sample. Find how many numbers out of this sample are in the range [5, 10). 12+8
f(e) =
exp |+a
Here, for a=-1,0, 1 the fe) are called as BE, MB and FD distribution functions respectively.
Plot three distribution functions with respect to x=F for the ranges 0.35 Sx<3.0, -1 sx<3
kgT
and -3.0 <x< 3.0 respectively with ôx = 0.05 in single graph. Show x and y axes.
(b) Considering constant probability of decay (2) of a single radio-active nuclei per unit time interval,
simulate a decay experiment for No number of parent nuclei at t=0. Consider the measurement
interval to be At with total duration of measurement to be T. Experimentally determine the fraction
of nuclei that survived at time t and plot a graph. Fit the data with the result obtained using the
standard analytical solution. Use 2 =0.0001 sec, No= 50000, Af = 10 sec and T = 500 sec.
8+12
E
5. (a) Plot Fermi Dirac Distribution function f(E)= as a function of in the range 0 to
E-E, Ep
e kI +1
2 for temperature T=300 K. Use legends, label the axes and set a proper title. Save the graph
in suitable format. Show that the probability of occupation of a state with energy AE above the
Fermi energy Er is equal to the probability that the state with energy AE below the Fermi energy
E; is empty, upto a certain numerical erTo.
Given: k- 8.617x10-5eV/K, Ep =0.2 eV and AE =0.002 eV]
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction bya step of one unit distance. Construct 10000 such random walk problems and find the
probability that the walker is exactly at the starting position after I000 random steps. 10+10
(0904)
(3) B(Sth Sm.)-Physics-HPr/CC-12P/Inst/CBCS/Day-3
6. (a) Using appropriate transformation, generate a random sample having exponential distribution from
a uniform random sample of size 1000 in the interval (0,1]. Hence plot the histogram of the
exponential distribution so obtained. Use legends, label the axes and set a proper title. Save the
graph in suitable format.
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction. Construct the above random walk problem with 100 steps and ensemble size of 10000.
Find the probability that the random walker will reach a distance of 10 unit in either direction at
any time during its motion. Also find the average time to reach there. 8+12
(0904)
|B(Stlh Sn.)-Plhysics-H/Pr/CC-12P/lnst./CBCS/Day-1|
2024
PHYSICS HONOURS PRACTICAL
Paper : CC-12P
(Statistical Mechanics)
Full Marks : 30
1. (a) Using appropriate NumPy function, draw a random sample of size 200 having Uniform Distribution
in the interval [0, 1) and show the randomness in a scatter plot by dividing the sample into two
subsamples of equal size. Also plot the correlogram for the sample drawn as a time series.
(b) Aradioactive sample, having half-life of 500 seconds, initially (at t=0) contains 10000 nuclei. Simulate
the radioactive decay experiment to numerically estimate the number of parent nuclei (N) present in the
sample at an arbitrary time t (in seconds) and plot the result as N() vs. t graph. Fit the simulated data
with the analytical result and show the fitted graph in the same plot. Find the fitted values of the initial
number of parent nuclei and the decay probability per second per nuclei. 8+12
2. (a) Write a Python program to generate Nuniform random numbers X= (g X,..*} between
[0, 1) using any Python module. Obtain the distribution of X for 20 bins. Plot the distribution
histogram.
Transform the numbers X to obtain the set of numbers Yaccording to the following rules.
(ii) Y= 2
Plot the distribution of each Yseparately.
(b) Simulate an unbiased random walk in two-dimension and plot the RMS value of end-to-end distance
as a function of time with symbols. Fit the data and show that it follows a power law. Hence find
the exponent of the power law. Plot the fitted curve in same figure with line. 8+12
(0904)
(2) B(Sth Sm.)-Physics-HPr/CC-12P/Inst/CBCS/Day-1|
3. (a) A single trial of a random experiment is tossing an unbiased coin 6 times. Simulate an experiment
consisting of 10000 such trials. Plot the distribution of total number of heads obtained per trial in
histogram and comment on the nature of the distribution. Find the probability of getting exactly 2
heads in a single trial and compare with its theoretical value.
(b) Generate 1000uniform random number between 0 and 1. Convert them to exponential distribution
using a suitable transformation and plot them as normalized histogram. For the generated exponential
distribution, find andprint the second central moment about mean and third central moment about
mean. What are the significances of these two moments? 10+10
E
4. (a) Plot Fermi-Dirac Energy Distribution function f(E) as a function of in the range 0 to 2 for
EF
temperatures T =3K and 300K. Use legends, label the axes and set a proper [Link] the graph
in suitable format. For particles obeying the given distribution, find the probability of occupation of
states below Fermi energy Ep for both the temperatures and comment on the result.
[Given : Eg= 0.15 eV and k=8.617 x 10-5 eV/K]
(b) Write a Python program to perform the following integration using Monte Carlo integration method
erf (r) =
for -3<xs3 and Sx=0.1. Plot erf() vs. x within the given range. 10+10
5. (a) Using appropriate umPy function, draw a random sample of size 10000 having Standard Normal
Distribution and plot the corresponding distribution as normalized histogranm. Determine the mean
and variance of the sample. Find the fractions out of this sample that are in the range -1, 1] and
[-3, 3] and comment on the result.
(b) Two persons are playing a simple coin-lip game. They flip a coin in turn, and whocver first gets
a head wins the game. Write a program to model M= 10000) such games and
estimate the
probability for the person who starts flipping to win the game. 8t12
(0904)
(3) |B(Sth Sm.)-Physics-H/Pr/CC-12P/lnst./CBCS/Day-1
6. (a) Given the molar specific heat of solids according to
(i) Dulong-Petit law : Cyp = 3R and
T,
4
x*exp(x)
(ii) Debye model: Cyn =9R -dx
[exp(r)-1'
Plot as a function of temperature Tin the range Ito 50K for Tp- 40K. For evaluating the
CyP
integral, use Monte-Carlo method. Use legends, label the axes and set a proper title. Save the
graph in suitable format.
(b) Using central limit theorem (CLT), generate a standard normal distribution of random numbers
from auniform distribution. Design the range [a, b) and sample size Nof the uniform distribution
such that the generated distribution is standard normal. Determine the values of mean and variance
of the distribution so obtained. Plot the nomalized histogram of the distribution. [Given:The mean
are ( a }
and variance of a continuous uniform distribution in the range [a,b) 2
-b)
and (a-a',
12
10+10
(0904)
|B(Sth Sn.)-Physics-HPr/CC-12P/AnstCBCS/Day-2
2024
PHYSICS HONOURS PRACTICAL
Paper : CC-12P
(Statistical Mechanics)
Full Marks : 30
Programming Language : Python
The figures in the margin indicate full marks.
[LNB : 05, Viva voce : 05, Experiment : 20]
Day -2
Answer any one question.
1. (a) Using appropriate NumPy function, draw a random sample of size 1000 having standard normal
distribution. Find the fraction of random numbers out of this sample that do not fall in the range
2, 2]. Divide the sample into two randomly selected subsamples x and y of equal size and show
qualitative randomness of the original sample via y vs. x graph in a scatter plot.
(b) A single trial of a random experiment is tossing a biased coin m times with 60% probability of
getting Head. Simulate an experiment consisting of N such trials. Plot the total number of Tails
obtained per trial in a normalized histogram. Also plot the corresponding theoretical binomial
distribution in the same plot. (Consider m= 10 and N= 1000) 8+12
2. (a) Generate asample of N exponentially distributed random integers in the range [0, o) with mean
value of 10. Find the mean and standard deviation of the sample. Create and print the frequency
distribution of the above sample with class intervals [0,10), [10, 20), (20,30),..and plot them in a
histogram.
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction by a step of one unit distance. Construct 10000 such random walk problems and find the
probability that the walker is exactly at adistance of 10steps from the starting position in10+10
either
direction after 1000 random steps.
(0904)
(2) |B(S Sn.)-Physies-II/Pr/C-I2P/ust./CBCS/Day-2
3. (a) Generate N= 1000 random numbers betwcen 0 to I. Generate cxponential distribution from the
above numbers for scale parameter, =2.0. Plot the normalized distribution of the above numbers.
Plot the theoretical curve corresponding to the distribution with line in the same graph.
(b) Two persons A and B are playing a two-coin lip ame. They Ilip two coins in turn, and whocver
firstget hcads for both thecoin wins the game. Write a program to model M= 10000 such games.
Estimate the probability for the person who starts flipping to win the game. 8+12
4. (a) Define A(a) = Evaluate A(a) using Monte-Carlo method of averaging over
J-a'sin'x
uniform random sampling varying a between 0 to I and plot A(a) vs. a.
(b) Simulate a nuclear decay experiment counting the number of decays in a measurement interval of
10second for a radioactive samplecontaining 10 parent nuclei having constant decay probability
of 10 per nuclei per second. Perform 1000 such Experiments with same number of initial parent
nuclei and plot the distribution of measured decay counts as a normalized histogram. In the same
graph, plot the corresponding Poisson distribution with line. 8+12
5. (a) Given the molar specific heat of solids, according to Debye model,
3
T
x* exp(x) dx, Plot CD as a function of
T
in the range 0.001 to 0.020.
[exp(x)- 1 3R Tp
For integration, use Monte-Carlo method of averaging over uniform random sampling. Using curve
fitting procedure, show that in the given temperature range varies as and find the
3R
constant of proportionality.
(b) GenerateN exponential random numbers (with mean value 10) and store them in an array. Draw
n samples from the array, cach sample containing s random numbers. Conpute the mean of these
n samples and store the means in another array. Plot the histogram of the original array and the
array of mcans in same graph. Take N 10000, n 1000 ands-50 as runtime inputs. Connent
on the nature of the distribution that the means follow. 10+10
(0904)
(3) B(5th Sm.)-Physics-H/Pr/CC-12P/lnst/CBCS/Day-2
2 1 E
6. (a) Plot Maxwell-Boltzmann energy Distribution f(E)= Vr(kr3/2exp in the range 0 to
kT
0.5 eV for temperatures T= 100K, 200K and 300K. Use legends, label the axes andset a proper
title. Save the graph in suitable format. Comment on the nature of the plots at different temperatures.
[Given: k= 8.617 x 105eV/K.]
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction where x is the distance of the walker from starting position at a time t after a large
number of steps. Construct the above random walk problem in python with 1,000 steps and
ensemble size of 10,000 and verify the diffusion relation,
=2Dt
plotting both theoretical and simulated curves in same figure. Here D= is the diffusion constant,
2t
l= length of each random step and t= time taken for each step. 8+12
(0904)
2.08.24
B(4h Sm.)-Plhysics-HIPr:/CC-10PIlnst/CBCSIDay-3
2024
DAY - 3|
Programming Language : Python
[Instruction : Use proper title, axis label and legends in the plots]
Distribution of Marks
2. Solve the time-independent Schrödinger equation for aone-dimensional Quantum Harmonic Oscillator
to findground and first excited state. Use shooting algorithm to find eigenenergies and Euler or Numerov
algorithn for solving ODE to find normalized wave functions.
Distribution of Marks :
(a) Working formula (Schrödinger equation and its dimensionless form, formula for Euler/Numerov
algorithm). 4
(b) Finding and printing energy eigenvalues using shooting method (any SciPy root searching package
Imay be used) along with the shooting curve. 10
(c) Finding and plotting of the normalized wave functions along with the potential in the same graph.
6
[Given: =1]
Distribution of Marks :
2m
[Given =l,u =10]
Distribution of Marks:
(a) Working formula (Schrödinger equation, formula for Euler /Numerov algorithm). 4
(b) Finding and printing energy eigenvalues using shooting method (any SciPy root searching package
may be used) along with the shooting curve. 10
(c) Finding and plotting of the wave function along wvith the potential in the same graph (a scaling
factor may be introduced). 6
d'u(r)(IQ +1)
R(r)="() Radial wave function
(a) Finding and printing energy eigenvalue using shooting algorithm (any SciPy root searching package
may be uscd).
(b) Finding and plotting of normalized radial wave function.
(c) Determine the probabilityof finding the electron within most probable radial distanee.
(4 ) B(4th Sn.)-Physics-HIPr/CC-10Pllnst./CBCS/Day-3
6. Write down the Crank-Nicolson operator to study the time evolution of wave function in one dimension,
explaining the symbols used.
Numericallysolve the time-dependent Schrödinger equation in one dimension to study the tunneling of
a Gaussian wave packet of the form
v(x, )= exp a
+ilkx.
through a potential barrier of finite height having the form
otherwise
using Crank-Nicolson algorithm. Hence plot the probability density at appropriately chosen three different
instances of time to exhibit time evolution of wave function.
Here, x a, k, x, and w are constants, to be chosen appropriately and i=-1.
What are the advantages of using Crank-Nicolson algorithm to study time evolution of wave function
for solving time-dependent Schrödinger equation in one dimension?
Distribution of Marks :
2024
PHYSICS HONOURS PRACTICAL
Paper : CC-10P
(Quantum Mechanics)
Full Marks : 30
Find the eigenenergies of the bound states with odd parity by graphically solving the given
transcendental equation that appears as the eigenvalue condition and plot the corresponding normalized
wave functions by numerically solving the time-independent Schrödinger equation and hence, determine
inner product of states.
Distribution of Marks:
3
(a) Statement of applicable boundary conditions.
(b) Plotting of graphs to solve the transcendental equation.
(c) Reading the guess root viewing the graph.
(d) Finding and printing of eigen energies from refined roots using guess values (any SciPy root
searching package may be used).
(e) Finding and plotting of thenormalized wave functions in same graph (any method may be used for
integration).
2
() Determination of inner product of' states.
(2) B(4th Sm.)-Physics-HIP:CC1OPILnst./CBCS/Day-2
2. Solve the time-independent Schrödinger cquation for a onc-dimensional Quantum Harmonic Oscillator
to tindground and firstexcited state. Use shooting algorithm to find eigencnergies and Euler or Numerov
algorithm for solving ODE to find normalized wave functions. Hence show that the states are orthogonal.
Distribution of Marks :
(a) Working formula (Schrödinger equation and its dinensionless form, formula for Euler/Numerov
algorithm). 4
(b) Finding and printing energy eigenvalues using shooting method (any SciPy root searching package
may be used). 9
O, x<0
V(r)= 0, 0<xsa
100, X>a.
Solve the time-independent Schrödinger equation numerically to find the first two bound states. Use
shooting algorithm to find eigenenergies and Euler or Numerov algorithm for solving ODE to find the
normalized wave functions. Plot the normalized wave functions and probability densities of the first two
bound states in different graph (any method may be used for integration). Comment on the nature of
the probability density plots.
2m
[Given : =1, a=1]
Distribution of Marks :
(a) Working formula (Time-independent Schrödinger equation and formula for Euler/Numerov method).
(b) Finding and printing the energy eigenvalues using shooting method (any SciPy root searching
package may be used).
(c) Finding and plotting of the normalized wave functions and probability densities in different graphs
and (any method may be used for integration) comment on the nature of the probability density
plots.
(3) B(4ui Sm.)-Plysics-1IPr/CC10PIIsL/CBCSIDay-2
4. A particle of nass » is in a polential
|100, x<0
V(*) =
x>0.
Solve the time-independent Schrödinger cquation numerically to find first excited state. Use shooting
algorithm to find eigenenergy and Euler or Numerov algorithm for solving ODE to find the normalized
wave function. Hence find the probability density.
2m
[Given =1]
Distribution of Marks :
4
(a) Working formula (Schrödinger equation, formula for Euler/Numerov algorithm).
(b) Finding and printing energy eigenvalue using shooting method (any SciPy root searching package
10
may be used) along with the shooting curve.
(c) Finding and plotting of the nonalized wave function along with the probability density in the same6
graph.
6. Writedown the Crank-Nicolson operator to study the time evolulion of wave function in one dimens1on.
explaining the symbols used.
Numerically solve the time-dependent Schrödinger equation in one dimension to study the tunncling of
a Gaussian wave packet of the form
V(x)= 0, otherwise
using Crank-Nicolson algorithm. Hence plot the real part of wave function at appropriately chosen three
different instances of time to exhibit time evolution of wave function.
B(4thSmn.)-Physics-HIPr/CC-10Pllnst./CBCS/Day-1
2024
Vo)= Ix|sa
V: lx|>a.
Find the energy of the ground state by graphically solving the given transcendental equation that appears
as the eigenvalue condition
tan z =(o/:)' -1.
a
where z=2mE and 2) 2mV, (symbols have usual meanings).
Plot the corresponding normalized wave functions by numerically solving the time-independent
Schrödinger equation. Also plot the probability density in the same graph.
Given: =1, , =30 and a =1]
Distribution of Marks :
(a) Statement of the applicable boundary conditions. 3
(d) Finding and printing of the eigenenergy from refined root using guess value (any SciPy root
searching package may be used). 3
(e) Finding andploting of the wave function along with the probability density in the same graph (any
method may be used for integration).
(2) B(4th Sm.)-[Link]-10PIInst./CBCS/Day-1
2. A particle of mass 1 is in a potential
0. X<-a
V()=-V -asxsa
| 0, X> a.
Solve the time-independent Schrödinger equation numerically to find first two bound states. Use shooting
algorithm to find eigenenergies and Euler or Numerov algorithm for solving ODE to find normalized
wave functions.
0, I<0
V(r)= x
x>0.
2
Solve the time-independent Schrödinger equation numerically to find the first two bound states. Use
shooting algorithm to find eigenenergies and Euler or Numerov algorithm for solving ODE to find and
plot the normalized wave functions of first excited state and the potential.
m
Given:
=1|
Distribution of Marks :
(a) Working formula (Time independent Schrödingerequation, Formula for Eular/Numerov Method).
(b) Finding and printing the energy eigenvalues using shooting method (any SciPy root searching
package may be used) along with the shooting curve. 10
(c) Finding and plotting of the normalized wave functions along with the potential in the same graph.
6
B(4th Sm.)-Physics-HIPr./CC-10P/Inst./CBCS/Day-1
(3)
4. A particle of mass m is in aone-dimensional potential
-x, I<0
0, x>0
numerically to find the first two bound states. Use
Solve the time-independent Schrödinger equation
Numerov algorithm for solving ODE to find the
shooting algorithm to find eigenenergies andEuler or orth0gonal.
normalized wave functions. Hence showv that the states are
2m
[Given : -=1]
Distribution of Marks:
equation and formula for Euler/Numerov method).
(a) Working formula (Time-independent Schrödinger 4
V(x,1) = exp a
moving in free space using Crank-Nicolson algorithm. Hence plot the probability density at appropriately
chosen three different instances of time to exhibit time evolution of wave function.
Here, x0> aand k are constants, to be chosen appropriately and i=y-1.
What are the advantages of using Crank-Nicolson algorithm to study time evolution of wave function
for solving time-dependent Schrödinger equation in one dimension?
Distribution of Marks :
2024
PHYSICS - HONOURS PRACTICAL
Paper : CC-8P
Full Marks : 30
4a
-te
You may take a = 1, b= 2, c= 1. Use appropriate SciPy function. Plot the integrand within the
domain (-5, 5].
Code : 6, Plot : 2, Total : 8
(b) The motion of a pendulum is described by the following differential equation :
Write a Python program to solve the above differential equation using suitable function from SciPy
Imodule. The initial conditions are given as 0( =0) = 1t =0) =0. Take L=0.3 m,
10 dt
de within the given domain.
g=9.8 m/s. Plot ys.
dt
Code : 8, Plot : 4, Total : 12
B(4h Sm.)-Physics-H/Pr/CC-8PCBCS/Day-III
(2)
equation
2. (a) Write aPython programto solve the following differential
dy_ x'+y ; y(1) =1, I<rs3
dx
Use Odeint package from SciPy. The exact analytical solution is given by y,(x) = x2 In(x) +1 :
Plot the numerical solution andthe 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 -, I| can be written as
F(r) =
2 +a, cos
n=
th, sin "
where
4,s)cos" ,n=0,.2.3.
nN
dr, n=1,2,3,..0
Analyse the Fourier series of a Sawtooth wave. Evaluate the Fourier coefficients and print first
5coefficients. Plot the constructed series with the given periodic function.
Code : 7, Plot : 3, Total: 10
(3) | B(4th Sm.)-Physics-HPr/CC-8P/CBCS/Day-III|
3. (a) Write a Python program to evaluate the integral : P, (x)P,(x)dx, where Pn(x) signifies the
-1
Legendre polynomial. Keep 'm' and 'n' as input
parameters.
Compute the integral for (m, n) =(2, 3), (3, 3), (3, 4), (4, 4). Plot P.(r) vs. x
any four different n-values of your within x e[1, 1] for
choice in the same graph.
Code : 6, Plot : 4, Total : 10
(b) Write a program to solve the 1-D
Diffusion equation :
OU(x,)
D = 1.0
F(x)- 0
( T ,sin
nTX
where
, n=0,1,2,3,..0
-1
n=1,2,3,...0
-1
Plot the numerical solution UMx, ) with respect to x for two different time instants (0 S1s 20).
Code: 10, Plot:2, Total : 12
(b) Tocalculate the work done against gravity to take a mass to escape the Earth's gravitational tield,
one needs to perform the following improper integral :
Write a Python program to compute this integral using appropriate SciPy module. Take a = 1, r -1.
Also, evaluate the above integral, taking the upper limit as : 10, 50, 100 and compute the deviation
of the results from I.
|8(x-a)f(r)d =f(a)>
-O
Take, f(x) =x and a=2. Plot 8(r -a) vs. x for three values of n. Set appropriate axes labell1ng
and put legend in the graph.
Programn:6, Graph : 4, Total : 10
(b) Write a Python program to solve the following differential equation :
+y=0; 1<x<5
dy2
Use Odeint package from SciPy. The exact solution is given by y(x) =x+ 3x'. Plot the numerical
solution and the exact solution in the same graph within the given domain.
Code : 6, Plot : 2+2, Total: 10
|B(41h Sm.)-Physics-H/Pr/CC-8P/CBCSDay-1|
2024
PHYSICS HONOURS - PRACTICAL
Paper : CC-8P
Full Marks : 30
1. (a) Consider an undamped simple harmonic oscillator that is subjected to a sinusoidal driving force,
leading to the equation of motion described by the following differential equation :
di -=-moor-Fo sin(oo!).
Consider Oo=1, m=0.1 and Fo =1.5. Using appropriate SciPy module, write a Python program to
solve the above equation for the given initial conditions. Plot x vs. for 0 <t<50. Given initial
conditions, x(t = 0) = 0, dx
dt
(t=0) =0.01. Code : 10, Plot : 2, Total: 12
(b) Compute the improper integral using quad function from SciPy package
Cog2
Plot the integrand in the range x e [2, 5]. Label the axes and write the integrand as a legend inside
the graph.
Program:5, Graph: 3 : Total : 8
(2) B(4th Sm.)-Plhysics-HPr/CC-8P/CBCS/Day-i!
2. (a) Solve the 2-D Laplace's equation inside a region of unit square :
=0
Fr) =0+)a,
2
cos nTX
+, sin
n=]
where
=)coslá, n=0,1.2,3,..
-dr, n=1,2,3, ..c
OU(x,1) o'U(x,t)
D.
D = 1.0
U(x, 0)= 0, 0<x< 10 Initial Condition
U0, 1) = 0; U(10,) = 50, VIV Boundary Condition
Space domain : xe [0, 10], Time domain : e (0, 5.0)
Plot UÇx, 1) with respect to x for four different time instants.
Program: 10, Graph: 2, Total: 12
(b) Numerically verify the recursion relation of the given Legendre's polynomial :
(n+ 1)P,n-(x)=(2n + 1)xP,(x) - nP-(r)
xE -1, 1]. Take n=2, 4, 6. Plot the right hand side and left hand side of the given relation in the
same graph for any one value of n.
=0, 0<x<l0
7x, t=0
Take x=5.0, k= 10.0. Plot the numerical solution Ux, ) with respect to x for four diferent time
instants t(0sts20). Label the axes and put appropriate legends in the graph.
Program: 10, Graph : 4, Total : 14
(b) Compute the integral
dx
1+'
-0
Plot the integrand in the range x -5, +5]. Label the axes and write the integrand as a legend
inside the graph.
Program : 4, Graph:2, Total:6
(4) B(4th Sm.)-Physics-HPr/CC-8P/CBCS/Day-lI
5. (a) Bessel function of first kind satisfies the recurrence relation :
d'y et
,+y dx
+y=; y(l) =0, () =
1. (a) Compute the improper integral using quad function from SciPy package
dx
(r+1)
Plot the integrand in the range x e (0, 3]. Label the axes and write the integrand as a legend inside
the graph.
Program :4, Output: 1, Graph: 1+%++1, Total : 8
(b) Write a program to solve Laplace's equation on square grid
+ - =0.
dx
Solve the differential equation using Odeint for the initial conditions x(t =0) =0 and dt (=0) =1.
Plot xas a function of t for the range 0<t<5. Take a=-0.2, b =-1.0, c=0.15, F, =0.48, o =3.5.
(b) Bessel function of first kind of integer order with real value satisfies the relation J,(x) =(-1yJ,().
Using SciPy special module, write a Python program to plot J,(x) and J-,() in the same window
for n = 1and n=2 in the range -10 <x< l0. Do the plots agree with the given relation?
Code : 4, Plot : 3, Comment:1, Total:8
3. (a) Write a program to solve I-d wave cquation :
=0 0<x<l
Plot the numerical U(x, ) solution with respect to x for any four time instants within 0 <I<1.5 in
the samne graph. Label the axes and put appropriate legernds in the graph.
S(r-a)f(r)dx =f(a)
Take f(r) = and a = 10. Plot the above representation of ß-function for three values ofn. Set
appropriate axes labelling and put legend in the graph.
Program: 5, Graph : 3, Total : 8
(3) B(4th Sm.)-Physics-H/Pr/CC-8P/CBCS/Day-I
4. (a) Suppose that we have an insulated wire of length L=l unit, such that the ends of the wire are
embedded in ice. Therefore, the boundary conditions are given as u(0, ) = u(1, ) =0C. The initial
temperature distribution is u(x, 0) = 50x(1-x). Write a Python program to solve the 1-D heat equation
for the above initial-boundary conditions :
Ou(x,t) =k o'u(x,)
Plot the temperature distribution u(r, ) vs. x for = 2. Take k = 0.05.
Code : 10, Plot : 2, Total : 12
(b) Write a Python program to analyze the Fourier series of the signal f(r) =sin(r), with the period
[0, n]
Evaluate first four Fourier coefficients and print their values. Plot the constructed series along with
the given function in the range 0 <x<n in the same graph.
The Fourier expansion of a given function F() periodic over interval -7, ] can be written as
nTX nTX
F(x) = +
a, cos +b,, sin
2
n=1
nTX
dx, n=1,2,3,...c0
-1
Inx dx
Take xo=5.0, k =10.0. Plot the numerical solution Ur, ) with respect to x for any four time
instants within 0sIS15. Label the axes and put appropriate legends in the graph.
Program: 10, Graph : (1+1)+(1+1), Total : 14
Z(Slh Sm)-Physics-I/Pr/CC-12 P/lust/CBCS/Day-3
2023
HONOURS PRACTICAL
PHYSICS
Paper : CC-12P
(Statistical Physics)
Full Marks : 30
(b) Given the molar specific heat of solids according to Debye model,
T
Cyp =9R
T
exp(x) -dx. Plot as a function of in the range 0.001 to 0.02.
Tp [exp(r) - 1]? 3R Tp
Show that in the given temperature range CuD3R varies as and find the constant of
proportionality. Use legends, label the axes and set a proper title. Save the graph in suitable format.
[Hint : Use curve fitting procedure plotting the fitted curve in the same graph). S+12
2. (a) Evaluate the value of n using Monte-Carlo Integration method of geometrie area estimation in
rectangular gridover uniform sapling Plot the geometrie curve and the points accumulated under
the curve in the Monte-Carlo method involved.
(b) Asingle trial of a random experiment is tossing a biased coin (p probabiliuy of obtaining head in
a toss) m times. Simnulate an experinnent consistng ol Nsuch rials. Plot the total number ot Heads
obtained per trial innormalized lhistogam. Also plot he corespaonding binomial distribution in he
Same plot. |Take the values of p 0.2, m 20 and N 1000 as runtinle paranmeter.
(2) Z(5th Sm.)-Physics-HPr/CC-12P/lnst/CBCS/Day-3
3. (a) A single trial of a random experiment is tossing a biased coin (with 20% chance of getting Tail)
20 times. Simulate an experiment consisting of 1000 such trials. Find the probability of getting at
least 6 but not more than 10 heads in a trial.
(b) Using central limit theorem (CLT), generate a standard normal distribution of random numbers
from uniform distribution. Design the range fa, b) and sample size N of the uniform distribution
such that the generated distribution is standard normal. Determine the values of mean and variance
of the distribution so obtained. Plot the normalized histogram of the normal distribution.
|Given : The mean and variance of a continuous uniform distribution in the range
with
4. (a) The mean occupation number of asingle particle state of energy eis given by (n.)=
e kl +a
in the range (-2, 2). Comment on the physical implication of the divergence of (n,) near e = .
Use legends, label the axes and set a proper title. Save the graph in suitable format.
(b) Simulate a nuclear decay experiment counting the number of decays in a measurement interval of
10second for a radioactive sample containi ng 10 parent nuclei having constant decay probability
of 10-5 per nuclei per second. Perform 1000 such measurements and plot the distribution of
measured decay counts as a normalized histogram. In the same graph, plot the distribution function
E
5. (a) Plot Fermi-Dirac Distribution function f(E)= E-E,
as a function of in the range 0 to
Ef
kI +1
2 for temperature T= 300 K. Use legends, label the axes and set a proper title. Save the graph
in suitable format. Show that the probability of occupation of a state with energy AE above the
Fermi energy Ep is equal to the probability that the state with energy AE below the Fermi energy
Ep is empty, upto a certain numerical errOr. [Given: k = 8.617x10-5 eV/K and AE= 0.02 Er
t/2
d
(b) Define A(«)= Evaluate A(a) using Monte-Carlo method of Integration by
V1-asinx
averaging over uniform random sampling varying a between 0to 1. Plot 4(a) vs. a and save the
plot in suitable format. 10+10
6. (a) Using appropriate transformation, generate a random sample having exponential distribution from
a uniform random sample of size 1000 in the interval (0,1]. Hence plot the histogram of the
exponential distribution so obtained. Use legends, label the axes and set a proper title. Save the
graph in suitable format. Evaluate first moment of the exponential distribution about zero and print.
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction, where x is the distance of the walker from starting position at time t after a large number
of steps. Construct the above random walk problem in python with 1,000 steps and ensemble size
of 10,000 and verify the diffusion relation
x=2Dr
plotting both theoretical and simulated curves in same figure,Here D = is the diffusion constant,
2r
|= length of each random step and = time taken for each step. [Hint: / and t may conveniently
be taken as unity] 8+12
Exam date: 16.02 2024
|Z(5thSm.)-Physics-HPr/CC-12P/lnst/CBCS/Day-2
2023
PHYSICS HONOURS PRACTICAL
Paper : CC-12P
(Statistical Physics)
Full Marks : 30
1. (a) Using appropriate NumPy function, draw arandom sample of size 10000 having Gaussian
Distribution of mean 1.0 and variance 4.0, and plot the corresponding distribution as normalized
histogram. Find the fraction of random numbers out of this sample that fall in the range [-2, 2].
(b) Asingle trial of a random experiment is tossing an unbiased coinm times. Simulate an experiment
consisting of N trials. Plot the total number of Tails obtained per trial in a normalized histogram.
Alsoplot the corresponding theoretical binomial distribution in the same plot. (Take the values
m= 10 and N= 1000 as runtime parameter.) 8+12
2. (a) Generate N uniform random numbers between -l and 1. Store them in an array. Select n = 1000
samples of sample size m and find the means of each sample and stored the means in an array.
Find the standard deviation of the array of means. Vary m (keeping n constant) from 10 to 300
and evaluate standard deviation of the array of means for each value of m. Plot the sample size
Vs, the standard deviation. Take N = 100000 as runtime input.
(b) Consider a random walk problem in one dimension with equal probability of movement in either
direction by a step of one unit distance. Construct 10000such random walk problems and find the
probability that the walker is exactly 10 step away from the starting position in the positive
direction after 1000 random steps. 10+10
(2) |Z(5th Sn,)-Physics-H/Pr/CC-12P/lnst/CBCS/Day-2
3. (a) Using appropriate NumPy function, draw a random sample of size 1000 having Exponential
Distribution f(x:B) =e in the interval [0, o) with scale parameter B=5 and plot the
corresponding distribution as normalized histogram. Determine the mean and standard deviation of
the sample. Find the fraction of random numbers out of this sample having values more than 10.
E
(b) Plot Fermi-Dirac Distribution function f(E)= as a function of in the range 0 to
E-E, EF
e kI +1
2 for temperatures T=1Kand 300 K. Use legends, label the axes and set a proper title. Save
the graph in suitable format. For particles obeying the given distribution, find the probability of
occupation of statesbelow Fermi energy Er for both the temperatures and comment on the result.
[Given : Ep= 0.15 eV and k =8.617x10-5 eV/K] 8+12
2 1
4. (a) Plot Maxwell-Boltzmann energy Distribution f(E)= in the range 0 to
0.5 eV for temperatures T= 100 K, 200 K and 300 K. Use legends, label the axes and set a proper
title. Save the graph in suitable format. Comment on the nature of the plots at different temperatures.
[Given:K=8.617x10-5 eV/K.]
(b) A radioactive sample, having constant decay probability of 0.001 per nuclei per second, initially
contains 10000 nuclei. Define a function to calculate statistically the number of parent nuclei (N)
present in the sample after a time oft second. Plot the numerical solution i.e., N() vs. t graph.
Also find the half-life of the radioactive sample interpolating the N(i) vs. tdata and compare itwith
its theoretical value. 8+12
(3) Z(5th Sm.)-Physics-HPr/CC-12P/lnst/CBCS/Day-2
exp
5. (a) Plot molar specificheat of solids by comparing (i) Einstein model: CuE =3 -
6. (a) Generate asample of 10000 normal random numbers with mean (4 - 10) and standard deviation
(G=5) and store it in an array. Using appropriate NumPy function determine mean (m) and
standard deviation (s) for a randomly selected subsample of 50numbers from the array. Print the
values of mean and standard deviation of the sample and subsample generated. For the subsample,
evaluate skewness, defined as u = where m, is the k-th central moment about mean.
(b) Evaluate the integral V-x dx using Monte-Carlo Integration method of averaging over uniform
0
random sampling and repeat the process 1000 times. Hence find the mean value of nwith standard
error of mean. 10+10
|Z(5th Sm.)-Physics-H/Pr/CC-I2P/Inst/CBCS/Day-l
2023
PHYSICS HONOURS PRACTICAL
Paper :CC-12P
(Statistical Physics)
Full Marks : 30
1. (a) Using appropriate NumPy function, draw a random sample of size 10000 having Exponential
Distribution f(x; 2)= he in the interval [0, o) with rate parameter à =0.1 and plot the
corresponding distribution as normalized histogram. Determine the mean and variance of the
sample. Find how many numbers out of this sample are in the range [0, 10).
(b) Aradioactive sample, having constant decay probability of 0.001 per nuclei per second, initially
contains 10000nuclei. Define a function to calculate statistically the number of parent nuclei (N)
present in the sample after a time of tsecond. Plot the numerical solution i.e., N() vs. t graph.
Fit the plot (in log-log scale) with the analytical result and show the fitted graph in the same plot.
Find fitted values of the initial number of parent nuclei and the decay probability per second per
nuclei. 8+12
2. (a) Using appropriate transformation, generate an exponential distribution from a uniform distribution
[2. S) of 10000 random numbers and plot the histogram of the exponential distribution so obtained.
With the help of NumPy exponential function generate a random sample having the same mean
value and sample size and plot the histogram along with the earlier one.
(b) Simulate an unbiased random walk in one-dimension and plot the RMS value of end-to-end distance
as a function of time in log-log scale with symbols. Fit the data and show that it follows a power
law. Hence find the exponent of the power law. Plot the fitted curve in same figure with line.
8+12
(2) Z(Sth Sm.)-Physics-HPr/CC-12P/Mnst/CBCS/Day-1
3. (a) A single trial of a random experiment is tossing a biased coin (having 70% chance of getting head)
mtimes. Simulate an experiment consisting of Ntrials. Plot the distribution of total number of heads
obtained per trial in histogram. Set a proper title. Save the graph in suitable format. Also find the
probability of getting exactly 10 heads in a single trial, (Take m=20 and N= 10000 during
runtime.]
(b) Generate 1000 uniform random number between 0 and 1. Store them in an array. Generate
exponential distribution from the above array using a suitable transformation and store the data in
another array. For the generated exponential distribution. find the first raw moment about zero and
second central moment about mean and print. 10+10
4. (a) Plot the following energy distribution functions for T =10K and 300 K:
(i)) Bose-Einstein distribution : f(E) = with u=0.l eV and
E-y
e kl 1
1
(ii) Fermi-Dirac distribution :f(E) = E-E, with Ep= l eV
e kI +1
[Given: Boltzmann constant k = 8.617×10-5 eV/K]
(b) Evaluate the value of r using Monte-Carlo integration methodof geometric area estimation in
rectangular grid over uniform sampling 1000 times and plot the corresponding distribution as
normalized histogram. Print the mean value of n obtained with standard error of mean. 8+12
5. (a) Given the molar specific heat of solids according to (i) Dulong-Petit law : Cyp=3R and
in the range to 50 K for T, = 40K. Use legends, label the axes and set a proper title. Save the
graph in suitable format.
(b) Using central limit theorem (CLT), generate a Gaussian distribution from the uniform distribution
[0,1) of random numbers of sample size 1000. Determine the values of mean and variance of the
distribution so obtained. Plot the normalized histogram of this distribution, along with corresponding
theoretical probability density function of a Gaussian distribution with same mean and variance.
8+12
(3) Z(Sth Sm.)-Physics-H/P/CC-12P/lnst/CBCS/Day-/
6. (a) Generate Nexponential random numbers (with mean m) and store them in an array. Evaluate
ezlm for each of the generated exponential random numbers (z) and store them in a seprarate
array. Plot the two arrays in two histogram using subplots. Evaluate mean and s.d. for the
transformed distribution. From the plot comment on the nature of the transformed distribution. Take
m and N as runtime input.
2022
PHYSICS HONOURS PRACTICAL
Paper :CC-10P
(Syllabus : 2019-2020)
IQuantam Mechanics|
Full Marks : 30
2. Solve the lD time independent Schrodinger equation with the finite potential of depth I = -10 in the
domain 0<r <1. Find out the ground state and the first excited state.
3. Consider 1D Quantum Harmonic Oscillator. Solve the Schrodinger equation numerically and obtain the
second excited state (E,). Take two energy values = E, (1 ±0.02) and plot the correspond1ng solutions.
5. Solvethe Infinite square well problem andplot a graph to show only the eigen energies between 4th to
6th eigen energy values. Plot the three eigen states in asame graph.
6. Consider a double well potential: V) = (Crt -) with . =0.0002 and C= 0.045. Find out the
two lowest energy states and plot.
7. Solve the radial part of the Hydrogen atom problem. Find out the first three s-states and plo.
8. Find out the first three excited states of a Quantum Harmonic Oscillator (QHO) in 1D and plot the
corresponding probability densities in a same graph.
9. Do a graphical presentation to locate the first three excited states for QHO in lD. Obtain the probability
density for the third excited state.
10. Write a Python function to oblain the eigen energies for the radialpar of the Hydrogen atom problem.
Use this function to obtain first 4 eigen energies.
11. Obtain the eigen energies and eigen states for a screened Coulomb potential (r)=
4 E0
[Hint : Change only the line in the Pvthon function for Hydrogen atom problem :
(L*(I+l)/r**2 2/[Link](-r/10) - E)* u, with a= 101
X(4th Sm.)-Physics-H/Pr./CC-10P/
(3) (Syllabus : 2019-20 & 2018-19)/ CBCS
obtain the solutions for a large
12. Obtain the solutions for the 2s, 2p states (n = 2, 1 = 0.1) and plot. To can consider logarithmic scale.
you
domain, Irom a very small value (close to zero) to a large value,
else: return 20
15. Write a Python function to upgrade the wave function at the succesive points in and around the domain
of a Quantum Harmonic Oscillator. Next, apply shooting method to find the correct eigen values and
corresponding eigen functions for first two excited states. Plot the eigen states in a same graph.
X(4th Sm.)-Physics-H/PrCC-8P/
(Syllabus : 2019-20 & 2018-19)/CBCS
2022
PHYSICS - HONOURS - PRACTICAL
Paper : CC-8P
[Mathematical Physics-II|
(Syllabus : 2019-2020)
Full Marks : 30
dx
Take suitable values of G and u and plot the function. Find the value of the integral.
Taking suitable values of
(b) Suppose F(1) =-at and G() =-br', are two Gaussians, where a, b>[Link]. Plot them.
aand b, show that the convolution of these twÍ Gaussians is also a
8+12
V2"n!\1,
where H, is the Hermite polynomial and we consider -=1. Plot the wave functions for n =0,
12+8
1and 2 in a single graph.
X(4th Sm.)-Physics-H/PrC-8P/
(2 ) (Svllubus: 2019-20 &2018-19)/CBCS
3. (a) Consider the following forced harmonic
motion
dx
+ kx =F cos of
dt
where the exact solution of the amplitude of the steady state FN(k-o) yo. Take y (0.5,
k- 5and F= 1. Solve the differential equation by using a suitable function trom seipy
module and
plot the amplitude resonance curve. Compare with the exact formula.
(b) Prove the orthogonality relation
TP()P,() -2n+1
where P,, is the m-th order Legendre polynomial. 12+8
4. (a) Analyse in aFourier series of a Sawtooth wave whose window size is 6 and frequency is 2.
Evaluate the Fourier coefficients and plot the constructed series with the given periodic function.
(b) Consider a rod (length L) of uniform cross-section and made of homogeneous material which is
perfectly insulated so that heat flows only along the length. Two ends of the rod are inserted in
two ice baths to maintain fixed temperature at both the ends and heat at the middle. Consider the
following diffusion equation :
Ou
where D is the diffusion coefficient and may be set to unity. Forming one initialcondition and two
boundary conditions, solve this partial differential eqution and plot the temperature profile
(temperature along the length of the rod). 8+12
|sin v'dk
0
Plot the solution up to acertain value of the upper limit. Comment on the plot.
(b) Write a python program to analyse in a Fourier series of a full-wave rectifier signal
fr) = |sin (x)|
Evaluate the Fourier coefficients and plot the constructed series with the given periodic function.
10+10
X(4th Sn.)-Physics-HPr/CC-8P/
(3) (Syllabus :2019-20 &2018-19)/CBCS
u u
where0<r<I. >0 withthe initial and boundary conditions:
Solve this problem and discuss the behaviour of the solution for large time. 10+10
X(4th Sm.)-Physics-H/Pr/CC-8P/
(4) (Syllabus : 2019-20 & 2018-19)/CBCS
(Syllabus : 2018-2019)
Full Marks : 30
Take suitable values of o and u and plot the function. Find the value of the integral.
(b) Suppose X(t) =-6r and Y(t) =-4P, are two Gaussians. Show that the convolution of these two
Gaussians is also a Gaussian. Plot them.
8+12
Take y =0.6 and k=1. Solve the differential equation by using a suitable function from scipy
module and plot the decay of x versus t for a definite range.
(b) Consider the Wave functions for lD quantum harmonic oscillator :
(x) =
two
where D is the diffusion coefficient and may be set to unity. Forming one initial condition and
boun dary conditions, solve this partial differential equation and plot the temperature profile
8+12
(temperature along the length of the rod).
sin s°dá
0
Plot the solution up to a certain value of the upper limit. Comment on the plot.
(b) Write apython program to anlyse in a Fourier series of a symmetric trianguiar signal. Evaluate the
Fourier coefficients and plot the constructed series with the given periodic function. 10+10
X4th Sm.)-Physics-H/PrCC-8P
(6) (STllabus : 2019-20 & 2018-19)/CBCS
6. (a) Write a suitable python program to calculate the integral : e dx. Set the accuracv level to
0.0001.
(b) Write a suitable program to solve the following equation :
2018
PHYSICS - HONOURS PRACTICAL
Paper : CC-1-P
Full Marks : 30
Date of Examination 28.11.2018
Answer any one question.
1. (a) Set a function f(x) = 2x3 + 9x- 11. Set range of xvalues from -15 to +10 and range ofy values
[y is treated as f()] from -7000 to +2200. Plot this function in the range. Indicate y axis on the
graph. The x label willbe x value andy label will be new function". Set the tics in the x axis
at interval 2-5. Store the output in a file and print it.
Plotting : 7, Print : 3.
(b) Create an empty list. Input the total number of items in the list. Then create the list by appending
each element using a loop. Interchange the first and last but one elements.
Create another list where the elements will be the square root of the elements of the first list.
Calculate the sum and average of the second list. Print the first list before and after interchange,
the second list, the sum and average of the second list.
Program : 8, Output : 2.
2. (a) Set a function f(*) = cos (x) 0- 5x. Set range of x values from -20 to +20 and range of y values
[vis treated as f(x)] fromn -10to +12. Plot this function in the range. Show the x axis on the graph.
The x label will be x value" and y label will be "cos (x) -0:5x". The tics in the x axis will be at
interval of 2. Store the output in a file and print it.
Plotting:7, Print : 3.
(b) Create an empty list. Input the total number of items in the list. Then create the list by appending
each element using a loop. Print the list.
Pick up the first number from the list and compare with each element of the list. If the later one
is larger then interchange them, so that after the whole processthe Oth element will have maximum
value in the list. Print the list. Print the list in reverse order.
Program : 8, Output : 2.
M(1st Sm.,)-Physics-HPr/CC-1-P/lnst.()
(Common)/(CBCS)/(28. 11.2018)
Set range of x values from -8 to 8 and range of y y is treated as f(x)] values from -2 to +12.
Keep tics in xaxis at interval 2. Set x label as "x value" and y label as jerk function". Plot the
function, store it in a file and give a printout.
Plotting:7, Print : 3.
(b) Create an empty list (say list A). Input the total number of items in the list. Then create the list by
appending each element using a loop. Print the list.
Create another empty list (say list B). Input the total number of items in the list. Then create the
list by appending each element using a loop. Print the list.
Multiply each element of the second list by 2 and add them to the first list to create a new list. Sort
the newly created list in ascending order and store it in a separate list and print it.
Program : 8, Output : 2.
Set the range of x values from -6 to +6 and the range of y values [y is treated as f(x)l from
-2 to +7. Set tick lebel of the x axis at interval of 1. Set the label of x axis as x values" and the
label of the y axis as "piecewise continuous fünctions". Plot the three functions, store the output in
a file andgive a printout.
Plotting :7, Print : 3.
(b) Calculate the sum of the following series with accuracy 0-001 (x should be greater than 1)
1 1 1
S =1+
Print the sum and the number of term where the series is terminated with the aforesaid accuracy.
Progran : 8, Output : 2.
M(lst Sm.)-Physics-HPr/CC-1-Plnst. ()
(Common)/(CBCS)/(28.11.2018)
5. (a) Plot sinh (r). -cosh (r) and -{1+ tanh()} on same graph. The line width of the curves will be
gradually increasing. That is, the line width of - cosh () willbe thicker than sinh² (*) and the line
width of -{| + tanh (x)} will be thicker than cosh (x). Set the range of the x values from
-6 to +ó and the range of theyvalues from -8 to +8. The x axis label will be x values" and that
of the y axis will be "hyperbolic functions". Store the output in a file and give a printout.
Plotting : 7, Print : 3.
-3
(b) A vector Å=-3i +7+4-2k can be written as a column matrix A= 7 Then the norm of the
4-2)
vector will be VA' [Link] the matrix Ainside the python script and calculate unit vector along
the direction of vector -A. Print the norm and the components of the unit vector.
Progran : 8, Output : 2.
-51 21-8
-3·4 1612
-0-5 7-05
1:57 0-42
6-2 -14-2
Plot the data in the second column against that of the first column. Set the range of x values from
-7-0to +7-0. Try to fit the data with the equation of type y=mxt c. Show the points and the fitting
line on the plot. Draw y axis on the plot. Arrange the range of y values on the axis in such a way
that the value of c can be realised from the axis. Save the fitted plot in a file and give a printout.
Mention the values of m and c coming after fitting the data.
Plotting:7, Print: 3.
(1 0 1)
(1-2 1-3 1·4 1-5
0 1 2
(b) Two matrices are A= 2-2 2-3 2-4 2-5| and B= . Define the matrices inside the
3 2 0
3-2 3-3 3-4 3-5 python script.
7 0 4)
Calculate the product of the two matrices. Print the three matrices.
Program: 8, Output : 2.
M(lst Smn.)-Physics-H/Pr/CC-1-P/lnst. (0)
(Common/(CBCS)(28. 11.2018)
2:1 2-5
4-6 7:7
57 12:17
6-6 15-9
8-2 22·4
Plot the data in the second column against that of the first column. Set the range of x values from
0to +9-0. Try to fit the data with the equation of typey= mx t c. Show the points and the fitting
line on the plot. Draw y axis on the plot. Arrange the range of y values on the axis in such a way
that the values of c can be realised from the axis. Save the fitted plot in a file and give a printout.
Mention the values of m and c coming after fitting the data.
Plotting:7, Print : 3.
1 4 (-1 -2 -3
-8 and B=| 4 -5 Define the matrices inside the
(b) Two matrices are A =| 2 3
14 -11 13 9 -8 -7, python script.
Program:8, Output : 2.
cos (x) =1 +
4! 6!
+..
2!
value.
adding the terms taking the value of x as input. Print the
value of n from the library
Calculate and print the cosine value using the library function. Import the
also.
Progran : 8, Output : 2.