Applied Optimization: Minimizing the Distance from a Point to a Curve My Solutions > Introduction In this problem you wi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Applied Optimization: Minimizing the Distance from a Point to a Curve My Solutions > Introduction In this problem you wi

Post by answerhappygod »

Applied Optimization Minimizing The Distance From A Point To A Curve My Solutions Introduction In This Problem You Wi 1
Applied Optimization Minimizing The Distance From A Point To A Curve My Solutions Introduction In This Problem You Wi 1 (122.29 KiB) Viewed 127 times
Applied Optimization: Minimizing the Distance from a Point to a Curve My Solutions > Introduction In this problem you will use Calculus to obtain the distance of the closest approach of a projectile to a fixed point. Recall that distance D(x, y) between a point on a curve (x, y) and a fixed point (X1,Yı) is computed using the distance formula: D(x, y) = V(x – xı)2 + (y – yı)2 = To find the distance of closest approach, we would like to use the techniques for finding the extreme values of a function, but these apply only to functions of a single variable and D is a function of both x and y. Therefore, we must first either: • Express the curve as a function of x (or y), so that y = f(x) (or x = f(y)), then replace that variable in terms of the formula involving the other, so that D(x, y) becomes D(x) (or D(y)). • Express both x and y as functions of a third parameter, t and substitute the expressions x(t) and y(t) for x and y above. In this case D becomes a function of the single variable t. Note that the latter method is more general, as a wider variety of curves can be expressed as parametric functions, and we use this approach in the problem below. Your Task Consider the problem of finding the distance of closest approach, Dmin, of a projectile to the peak of an obstruction. If the projectile motion is determined by the following parametric equations: • X(t) = Vot cos(@) y(t) = Vot sin (0) – 91 ? gt? 2

where vo, 0, andg are constant, we can use the method discussed in the introduction to find the closest approach to the obstruction by finding the minimum value of D(t). This problem is depicted in the image below where the top of the obstruction is located at the point (x,yı) = (40,20). 25 ſpc D(t) 20 15 10 5 0 0 20 40 60 80 100 2 Follow the steps below to obtain the minimum distance using MATLAB. The symbolic variable t has been created for you*, and code has been provided to define the projectile constants and the point location. 1. Use the projectile constants to define the symbolic functions x(t) and y(t) using the formulas above. 2. Use the point location along with x(t) and y(t) to define the distance function D(t). 3. Use the diff and solve functions to obtain the time of closest approach tmin by solving the critical value equation D' (t) = 0. 4. Evaluate D(t) at tmin to obtain the distance of approach, Dmin. 5. Convert both tmin and Dmin to decimal (numeric) variables using the double function.

When you have completed your solution, run it to view the values of tmin and Dmin. If they seem reasonable given the above figure, submit your solution for assessment. Script @ Save C Reset DI MATLAB Documentation 1 symst 2 % Declare t as a real variable >= 0 to avoid non-physical solutions 3 assume(t >=0); 4 % Projectile motion constants: 5 theta = sym(pi)/4; g = 9.8; Vo = 30; 6 % Point location 7 X1 = 30; y1 = 20; 8 9 % Define x(t) and y(t) 10 X(t) = 11 y(t) = 12 % Define D(t) 13 D(t) = 14 % Define dD(t) below 15 dD(t) = 16 % Find the critical time 17 tmin = 18 % Obtain the distance of closest approach 19 Dmin = 20

21 % Display the results 22 fprintf("Mimimum approach distance: %0.2f\nMinimum approach time: %0.2f', Dmin, tmin); Run Script Assessment: Run Pretest Submit Were x(t) and y(t) defined correctly? (Pretest) Was D(t) defined correctly? (Pretest) Is time of closest approach correct? Is the distance of closest approach correct?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply