<< Chapter < Page | Chapter >> Page > |
Answers:
1. Enter the following into the Google calculator and press Enter to produce the results shown.
Therefore, the initial momentum = 15000*kg*m/s at 0 degrees
2. 1000 kg*30 m/s = 30000 m kg / s at 0 degrees
3. 2000 kg*15 m/s = 30000 m kg / s at 0 degrees
4. 2000 kg*30 m/s = 60000 m kg / s at 0 degrees
A car with a weight of 10000 newtons is moving in a direction of 90 degrees at 40m/s. After going around a curve in the road, the car is moving in a direction of 0 degrees at 20 m/s. What is the change in momentum of the car?
Solution:
While this problem could be solved using the Google calculator, because of the number of steps involved, JavaScript is probably a better approach.
The solution script for this problem is shown in Listing 1 .
Listing 1 . Solution script. |
---|
<!---------------- File JavaScript01.html ---------------------><html><body><script language="JavaScript1.3">//The purpose of this function is to receive the adjacent
// and opposite side values for a right triangle and to// return the angle in degrees in the correct quadrant.
function getAngle(x,y){if((x == 0)&&(y == 0)){
//Angle is indeterminate. Just return zero.return 0;
}else if((x == 0)&&(y>0)){
//Avoid divide by zero denominator.return 90;
}else if((x == 0)&&(y<0)){
//Avoid divide by zero denominator.return -90;
}else if((x<0)&&(y>= 0)){
//Correct to second quadrantreturn Math.atan(y/x)*180/Math.PI + 180;
}else if((x<0)&&(y<= 0)){
//Correct to third quadrantreturn Math.atan(y/x)*180/Math.PI + 180;
}else{//First and fourth quadrants. No correction required.
return Math.atan(y/x)*180/Math.PI;}//end else
}//end function getAngledocument.write("Start Script</br>");
var weight = 10000//Nvar g = 9.8// m/s^2
//Find the mass of the carvar mass = weight/g;// kg
var ang1 = 90;//initial angle in degreesvar ang2 = 0; //final angle in degrees
var speed1 = 40;//initial speed in m/svar speed2 = 20;//final speed in m/s
var ang1r = ang1*Math.PI/180;//initial angle in radiansvar ang2r = ang2*Math.PI/180;//final angle in radians
//Remember, momentum is a vector quantity and momenta must// be added and subtracted using vector arithmetic.
//Compute the components of the change in momentum.var P1x = mass * speed1 * Math.cos(ang1r);
var P1y = mass * speed1 * Math.sin(ang1r);var P2x = mass * speed2 * Math.cos(ang2r);
var P2y = mass * speed2 * Math.sin(ang2r);var deltaPx = P2x-P1x;//change in horizontal component
var deltaPy = P2y-P1y;//change in vertical component//Compute the magnitude of the change in momentum using
// the Pythagorean theorem.var deltaPm = Math.sqrt(deltaPx*deltaPx + deltaPy*deltaPy);
//Compute the angle of the change in momentum usiing// trigonometry.
var deltaPa = getAngle(deltaPx,deltaPy);document.write("The givens." + "</br>");
document.write("weight = " + weight.toFixed(0)+ " kg</br>");
document.write("speed1 = " + speed1.toFixed(0)+ " m/s</br>");
document.write("angle 1 = " + ang1.toFixed(0)+ " degrees</br>");
document.write("speed2 = " + speed2.toFixed(0)+ " m/s</br>");
document.write("angle 2 = " + ang2.toFixed(0)+ " degrees</br>");
document.write("Computed mass." + "</br>");
document.write("mass = " + mass.toFixed(0) + " kg</br>");
document.write("Components of momentum vectors." + "</br>");
document.write("P1x = " + P1x.toFixed(0) + "</br>");
document.write("P1y = " + P1y.toFixed(0) + "</br>");
document.write("P2x = " + P2x.toFixed(0) + "</br>");
document.write("P2y = " + P2y.toFixed(0) + "</br>");
document.write("Components of momentum change vectors."+ "</br>");
document.write("deltaPx = " + deltaPx.toFixed(0) + "</br>");
document.write("deltaPy = " + deltaPy.toFixed(0) + "</br>");
document.write("Magnitude and angle of change vector."+ "</br>");
document.write("deltaPm = " + deltaPm.toFixed(0)+ " m kg/s</br>");
document.write("deltaPa = " + deltaPa.toFixed(0)+ " degrees</br>");
document.write("End Script");</script></body></html> |
Notification Switch
Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?