blob: 8d0d7ed9ecbc686f9433f6bd5083e4db8d62b77f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Initilization of variables
f=1/6 // oscillations/second
x=8 // cm // distance from the mean position
// Calculations
omega=2*%pi*f
// Amplitude is given by eq'n
r=sqrt((25*x^2)/16) // cm
// Maximum acceleration is given as,
a_max=(%pi/3)^2*10 // cm/s^2
// Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by
s=5 // cm
v=omega*sqrt(r^2-s^2) // cm/s
// Results
clc
printf('(a) The amplitude of oscillation is %f cm \n',r)
printf('(b) The maximum acceleration is %f cm/s^2 \n',a_max)
printf('(c) The velocity of the particle at 5 cm from mean position is %f cm/s \n',v)
|