Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the 2 files that needed to be downloaded are attached 1. In class we derived the IVP di (1) dt dr gR (c + R)2

the 2 files that needed to be downloaded are attached image text in transcribed
image text in transcribed
image text in transcribed
1. In class we derived the IVP di (1) dt dr gR (c + R)2 P12 (0) = 0, 0 = V, for the projectile problem. We made the rescalings y = x/R and T = t/RV-1 to get (2) di2 = (y +12 y(0) = 0, dy(0) = 1, where =V2/gR. (a) Part of the goal of this exercise is for you to learn how to use the matlab com- mand 'ode45', which numerically solves an ODE. Download the files projectile A.m' and rhs-projectileA.m'. Both are matlab m-files. The file 'projectile A.m' is a script, or matlab program. Read my comments in this script to understand what the program does. Use 'projectileA.m' to solve (2) for different values of > 0 and plot the solution. You should discover that the solution behaves differently for a small versus a large. Print out and hand in two plots showing these two different behaviors. Interpret your results physically, i.e., explain what the two graphs say about the motion of the projectile and explain why one would expect the projectile to behave differently for a small versus & large. To make this explanation, you need to look at how e is defined in terms of the original parameters in the model. (b) Let's call solutions that behave as in the small e case Type 1 solutions and solutions that behave as in the large E case Type 2 solutions. Based on part (a), it seems reasonable to expect that there is some threshold value z of which is the boundary between the values corresponding to Type 1 solutions and a values corresponding to Type 2 solutions. By using the matlab code and trial and error, approximate z accurate to one decimal place, (c) Let's now consider how solutions to the original model (1) depend on the parameters V, 9, and R. In particular, we assume we have fixed V = V, and we ask what values of 9 and R give Type 1 solutions and what values of g and R give Type 2 solutions. Sketch the curve in the first quadrant of the g R-plane that is the boundary between the set of pairs (9, R) that yield Type 1 solutions and the set of pairs (9, R) that yield Type 2 solutions. (You can sketch this curve by hand. You do not need matlab.) 8888888888 This script numerically solves 2nd-order ODE + d^2y/dt^2 = -1/(eps + (1+y)^2), y(0)=0, dy/dt (0)=1 8 and then plots the solution. The right-hand side of the equation is defined in the matlab function file 'rhs_projectilea.m'. 888888888888888888888888888888 8888888888 Declare epsilon as global. Set the value of epsilon. global eps; eps - 1.0; init - [01]; the ODE. Set the initial condition of t = [01]: Define the time interval over which solution will be computed. You may need to change 1 to a different number to see the long-term & behavior of the solution, depending on epsilon. Set some options used in the next command. Do not worry about this for now. options = odeset('RelTol', le-8, 'Abs Tol', le- 8); 8 Numerically solve the equation. See ode45 in matlab help for more info on this commmand. [T,Y] = ode 45 (@rhs_projectileA, t, init, options); Plot the solution. position subplot(2,1,1) set (gca, 'Font Size', 24) plot(T,Y(:,1)) See 'colon' in matlab help for why we use "Y(:,1)' here. title(l'y versus tau, epse, num2str(eps)]) Bylim([0,1.21) 88 velocity #subplot(2,1,2) 8set (gca, 'FontSize', 24) 8plot (T,Y(:,2)) #title(l'y' versus tau, eps=', num2str(eps ))) To save the plots for printing, uncomment the following line. saveas (gcf, 'eps2.pdf'); function dy = rhs_projectileA(t,y) global eps; dy = zeros (2,1); dy(1) = y(2); dy (2) = -1/(eps. *(y(1)+1).^2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago