0% found this document useful (0 votes)
159 views3 pages

MSC Part-2 Computational Physics

This document contains a computational physics exam paper with 5 long questions and 5 short questions. The long questions involve writing MATLAB programs and scripts to solve physics problems involving matrices, polynomials, series, kinematics, and calculus. The short questions involve relational operators, interpolation, matrix rank, Laplace transforms, and checking for singular matrices. The exam paper provides sample physics problems and systems of equations for the students to write MATLAB code to model and solve.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views3 pages

MSC Part-2 Computational Physics

This document contains a computational physics exam paper with 5 long questions and 5 short questions. The long questions involve writing MATLAB programs and scripts to solve physics problems involving matrices, polynomials, series, kinematics, and calculus. The short questions involve relational operators, interpolation, matrix rank, Laplace transforms, and checking for singular matrices. The exam paper provides sample physics problems and systems of equations for the students to write MATLAB code to model and solve.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

GOVERNMENT COLLEGE OF SCIENCE, LAHORE

M.Sc. Part-2, 2020


Examination: M.Sc.Physics. Roll No…………………………

PAPER: Computational Physics Time Allowed: 3 Hours.


Course Code: Paper-IV Max.Marks=50
Write short answers to the following questions: (2×05=10)
1- What are relational operators?
2- What are ill-conditioned equations?
3- What is singular equation?
4- Write a Matlab program to find the inverse of a matrix
2x+9y=5
3x-4y=7
5- Find the roots of x3-7x2+40x-34=0 using mat lab.

LONG QUESTIONS:
(8×5=40)
Q-1 a) Write a MATLAB script that uses given values of the applied voltages V1 and V2 and given values of the
five resistances to solve for the currents I1, I2 and I3. Use the program to find the currents for the case R1=5, R2
= 100, R3 = 200, R4 = 150, R5 = 250k ohm,V1 = 100, V2 = 50VOLT.
(𝑅1 + 𝑅4 )𝐼1 -𝑅4 𝐼2 =𝑉1
−𝑅4 𝐼1 +(𝑅2 + 𝑅4 + 𝑅5 )𝐼2 -𝑅5 𝐼3 =0
𝑅5 𝐼2 − (𝑅3 + 𝑅5 )𝐼3 =𝑉2
b) Write a program to calculate surface area and volume of sphere, where surface area A = 4πr 2 and V = 4/3 πr3.
Q-2 a) The temperature measurements of the containers A and B is given in the table. Write the program to
determine: (i) temperature of A greater than that of B (ii) temperature of B equal to that of A with day (iii)
temperature of B > 60 with days and (iv) find out the day with two temperatures are very close or apart from each
other.
Day 1 2 3 4 5
A 60 56.2 63 64 58
B 54.6 56.2 64 60 59
b) Write MATLAB program to plot time (t) against sin(t) and cos(t) graphs on the same figure using hold on and
with different colors. Use t(0, 4π).
Q-3 a) Write a MATLAB program using matrix method for solving the following equations
3x+2y-9z = -65, -9x-5y+2z = 16, 6x++7y+3z = 5
b) An object is dropped from towers of different heights reaching the ground in time T = (5,6,7,8,8.9,10.7) second.
Write the MATLAB program to find out the corresponding heights of the towers, also calculate total height and
shortest tower.
Q-4 a) The height and speed of a projectile launched with a speed of v o at an angle A to the horizontal are given by
h(t) = votsinA – 0.5gt2
v(t) = √𝑣𝑜2 − 2vogtsinA + 𝑔2 𝑡 2
where g acceleration due to gravity. The projectile will strike the ground when h(t) = 0, which gives the time to hit,
thit = 2(vo /g)sinA. Suppose that A=40O , vo =20m/s, and g=9.8m/s2. Use MATLAB relational and logical operators to
find the times when the height is no less than 6m and the speed is simultaneously no greater than 16m/s.
b) Write a script file to determine how many terms are required for the sum of the series 5k 2 -2k, k= 1,2,3,,,, to
exceed 10000. What is the sum for this many terms?
Q-5 a) y=0.4√1.8𝑥 For 0≤x≤52 then using MATLAB to plot y versus x. also label x as distance and y as height in
miles.
b) Plot polynomial 3x5 +2x4 -100x3 +2x2 -7x+90 over the range -6≤x≤6.

GOVERNMENT COLLEGE OF SCIENCE, LAHORE


M.Sc. Part-2, 2020
Examination: M.Sc.Physics. Roll No…………………………

PAPER: Computational Physics Time Allowed: 3 Hours.


Course Code: Paper-IV Max.Marks=50
Write short answers to the following questions: (2×05=10)
1- Write Matlab program to find the factorial of a given number (16).
2- What is inter-polation and extrapolation?
3- What is matrix rank?
4- What is Laplace transformation?
5- Write mat lab program to check whether the matrix given is singular or not?
3x+2y-9z=-65
-9x-5y+2z=16
6x+7y+3z=5
LONG QUESTIONS:
(8×5=40)
Q-1 a) Civil and transportation engineers must often estimate the figure traffic flow on roads and bridges to plan
for maintenance or possible future expansion. The following data gives the number of vehicles (in millions)
crossing a bridge each year for 10 years. Fit A cubic polynomial to the data and use the fit to estimate the flow in
the year 2000.
Year 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999
Vehicles 2.1 3.4 4.5 5.3 6.2 6.6 6.8 7 7.4 7.8
flow(millions)
b) Write a program to calculate surface area and volume of sphere, where surface area A = 4πr 2 and volume V
= 4/3 πr3.
Q-2 a) A mass m is suspended by three cables with tensions T1,T2 and T3, which are related by the following
equations
T1 /√35 -3 T2 √34 + T3 /√42 = 0
3T1 /√35 -4 T3 /√42 = 0
T1 /√35 -3 T2 √34 + T3 /√42 = mg
Write MATLAB program to solve for the tensions using three methods based on matrices. Read values of mg from
the user.
b) Write the MATLAB code to plot “t” against y(t) with labels such that
t = (0,0.5), h = 0.003 and y(t) = 𝑒 −8𝑡 sin(9.7t+ π/2)
Q-3 a) Find the matrix inverse of the matrix A=
2 9
3 -4
using MATLAB.
b) Find the roots of x3 -7x2 +40x-34=0 using MATLAB.
Q-4 a) Write a script file to plot a function
Y= {15√4𝑥 +10 for x>=9,10x+10 for 0≤x≤9, 10 for x<0}
For -5≤x≤30
b) if height h=v2 sinѲ/2g then create a table showing maximum height for the following values of v and Ѳ
v=10,12,14,16,18,20m/s and Ѳ=50,60,70,80 o
Q-5 a) For an object thrown at an angle “Ѳ” and initial velocity “u”, the horizontal range “R” is given by
R = u2 sin(2Ѳ)2 /g , where g=9.8m/s2 and u={120,160}m/s with h= 10.
Write a MATLAB program to print out R against angle Ѳ values using arrays. Take angle varies from 30 to 60 in
step size of 3o . Also calculate maximum value of R at the given data set.
b)Write MATLAB program to calculate factorial of a given number.

You might also like