MSC Part-2 Computational Physics
MSC Part-2 Computational Physics
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.