Question

In: Physics

Using Matlab code, solve the following: (a) Consider first the undamped pendulum ? + sin ?...

Using Matlab code, solve the following:

(a) Consider first the undamped pendulum ? + sin ? = 0, ?(0) = 0, ? (0) = b. Let x = ? and y = ? ; then x and y satisfy the system x = y y = ? sin x, x(0) = 0 y(0) = b. Solve this system numerically and plot, on a single graph, the resulting trajectories for the initial velocities b = 0.5, 1, 1.5, 2, 2.5. Use a positive time range (e.g., 0 ? t ? 15), and use axis equal to improve your pictures.

(b) Based on your pictures in part (a), describe physically what the pendulum seems to be doing in the three cases ? (0) = 1.5, 2, and 2.5.

(c) The energy of the pendulum is defined as the sum of kinetic energy (? )2/2 and potential energy 1 ? cos ?, so E = 1 2 (? ) 2 + 1 ? cos ? = 1 2 y2 + 1 ? cos x. Show, by taking the derivative dE/dt, that E is constant when ?(t) is a solution to the equation. What basic physical principle does this represent?

(d) Use ezcontour to plot the level curves for the energy. Choose the x and y ranges according to where most of the solutions from part (a) lie. Explain how your picture is related to the trajectory plot from part (a).

(e) If the pendulum reaches the upright position (i.e., ? = ?), what must be true of the energy? Now explain why there is a critical value E0 of the energy, below which the pendulum swings back and forth without reaching the upright position, and above which it swings overhead and continues to revolve in the same direction. What is the critical value E0? What is the value of b corresponding to E0? What do you expect the pendulum to do when b has this critical value? What did the plot in part (a) show? Explain.

(f) Now consider the damped pendulum ? + 0.5? + sin ? = 0, ?(0) = 0, ? (0) = b. Numerically solve the corresponding first order system (which you must determine) and plot the resulting trajectories for the initial velocities b = 0.5, 1, 1.5, ..., 6. You will notice that each of the trajectories in your graph tends toward either the critical point (0, 0) or the critical point (2?, 0). Explain what this means physically. There is a value b0 for which the trajectory tends toward the critical point (?, 0). Estimate, up to two-decimal accuracy, the value of b0. What would this correspond to physically?

(g) Recall the energy defined in part (c). Compute E and determine which of the following are possible: (1) E is increasing, (2) E is decreasing, (3) E is constant. Explain how the possibilities are reflected in the solutions to part (f).

Solutions

Expert Solution

use following matlab cose for a,b,c,d . program is user friendly so you can change and see for different values given in the question:

%Program Body
clear
clc
t= linspace(0,70);
%Input
prompt= 'For damped oscillation consider the following forces F1=-
b*v and F2=k*x. Insert the mass of the particle, damping constant b
and the spring force constant k \n';
m= input(prompt);
b= input(prompt);
k= input(prompt);
prompt = 'Insert the initial position of particle \n';
a= input(prompt);
%Defining functions
T= 2*m/b;
w= sqrt((k/m)-(b.^2/(4*m.^2)));
f= a*cos(w*t).*exp(-t/T);
v= gradient(f);
A= gradient(gradient(f));
K=0.5.*m.*(v.^2);
p=(0.5).*k.*(f.^2);
E= K+p;
%Obtaing the required subplots

%Displacement
subplot(2,2,1);
t= linspace(0,70);
plot(t,f);
title('Subplot 1: Displacement');
ylabel('Displacement');
xlabel('Time');
grid on;
grid minor;
%Velocity
subplot(2,2,2);
t= linspace(0,70);
plot(t,v);
title('Subplot 2: Velocity');
ylabel('Velocity');
xlabel('Time');
grid on;
grid minor;
%Acceleration
subplot(2,2,3);
t= linspace(0,70);
plot(t,A);
title('Subplot 3: Acceleration');
ylabel('Acceleration');
xlabel('Time');
grid on;
grid minor;
%Energy
subplot(2,2,4);
t= linspace(0,70);
plot(t,E);
title('Subplot 4: Energy');
ylabel('Energy');
xlabel('Time');
grid on;
grid minor;
%Program-end


Related Solutions

Using Matlab 1. Solve the following equations set f1 (x1,x2) = sin (sin (x1)) +x2 f2...
Using Matlab 1. Solve the following equations set f1 (x1,x2) = sin (sin (x1)) +x2 f2 (x1,x2) = x1+ e^(x2) a) Can this equation set be solved by the fixed - point method with the following expressions? And why? Show your analysis with a 2D graph. g1 (x1,x2) = -e^(x2) g2 (x1,x2) = -sin⁡(x1) b) Use Newton Raphson Method with initial values x1 = -2, x2 = 1.5. (8 significant figures. Please submit the code and results.)
Write your own MATLAB code to solve the system 10 − x + sin(x + y)...
Write your own MATLAB code to solve the system 10 − x + sin(x + y) − 1 = 0 8y − cos2 (z − y) − 1 = 0 12z + sin(z) − 1 = 0 using a residual tolerance of 10^−6 and the initial guess, ~x 0 = [0.1, 0.25, 0.08]^T . Print out the values for x, y and z for each iteration in a table similar to the one you created for the problems of the...
solve in MATLAB and screenshot code ?′′ −??′ +??= ???(????−?????)
solve in MATLAB and screenshot code ?′′ −??′ +??= ???(????−?????)
Solve using matlab code!! Use the graphical method to solve 4x1 − 8x2 = −24 x1...
Solve using matlab code!! Use the graphical method to solve 4x1 − 8x2 = −24 x1 + 6x2 = 34 Check your results by substituting them back into the equations.(include this on the code)
I need an original matlab code and gui for a simple double pendulum. This needs to...
I need an original matlab code and gui for a simple double pendulum. This needs to be original and not too complicated. Please provide basic instructions. Thank you!
The following code must be written using matlab How to loop through a vector in matlab...
The following code must be written using matlab How to loop through a vector in matlab and assigning a value to every 4th entry. The vector could be of any length. Thanks
Write a matlab code for given task Use your ‘sin’ or ‘cos’ function to generate a...
Write a matlab code for given task Use your ‘sin’ or ‘cos’ function to generate a sinusoid wave having two components as f1 = 3kHz and f2 = 5kHz and then sample it with fs = 10kHz. Calculate its fft with zero frequency component in the middle. Plot it on a properly scaled w-axis. Specify if there is aliasing or not? If there is aliasing specify which component is casing the aliasing
The following code must be written using matlab and must be using a for-loop. NOTE! Write...
The following code must be written using matlab and must be using a for-loop. NOTE! Write a computer program that assigns random integers for each entry and generates a row vector. Different random integers should be drawn from different intervals for position 1, position 2, position3 and position 4 of the array. After these first 4 positions are drawn. The whole thing should start over where position5 drawn from same interval as positions 1, position6 drawn from same interval as...
The following code must be written using matlab and must be using a for-loop. NOTE! Write...
The following code must be written using matlab and must be using a for-loop. NOTE! Write a computer program that assigns random integers for each entry and generates a row vector. Different random integers should be drawn from different intervals in chunks of 4 , that is chunk1-chunk2-chunk3-chunk4 The parameters for specifying the lintervals by which the random numbers should be drawn should be able to change and be hardcoded in the script, however, be hardcoded in the script.
Matlab project: Solve using Matlab three problems: One using the combination formula One using the permutation...
Matlab project: Solve using Matlab three problems: One using the combination formula One using the permutation of n objects formula One using the permutation of r objects out of n objects You can pick these problems from the textbook or you can make up your own questions.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT