The (x,y) coordinates of a certain object as a function of time t are given by x(t) = 5t - 10; and y(t) = 25t2 – 120 t + 144, for 0 ≤ t ≤ 4. 1)

36 views (last 30 days)
  1. determine the time at which the object is the closest to the origin at (0,0);
  2. determine the minimum distance
solution:
for t=0:0.1:4
x=5*t-10;
y=25*t^2-120*t+144;
dist=sqrt(y^2+x^2);
end
need help determine the time at which the object is the closest to the origin at (0,0); and determine the minimum distance
solution:

Accepted Answer

Torsten
Torsten on 28 Sep 2022
Edited: Torsten on 28 Sep 2022
syms t
x = 5*t-10;
y = 25*t^2-120*t+144;
distance_squared = x^2+y^2;
d_distance_squared_dt = diff(distance_squared,t);
time_of_minimum_distance = vpa(solve(d_distance_squared_dt==0,'MaxDegree',3));
time_of_minimum_distance = time_of_minimum_distance(abs(imag(time_of_minimum_distance))<1e-3)
time_of_minimum_distance = 
2.2329755303037266971416759922807
minimum_distance = sqrt(subs(distance_squared,time_of_minimum_distance))
minimum_distance = 
1.3576993861022464728780306330975
tnum = 0:0.001:4;
xnum = @(t)5*t-10;
ynum = @(t)25*t.^2-120*t+144;
hold on
plot(xnum(tnum),ynum(tnum))
plot(xnum(double(time_of_minimum_distance)),ynum(double(time_of_minimum_distance)),'o')
hold off

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!