Write a program to find the acceleration of the object at a point ( 2, 3 ) using Matlab symbolic
tool box commands. The particle position function is following. [2]
𝑠(𝑡) = 2𝑡
4 − 7cos(𝑡) + 𝑒
−2𝑡
As the question is not properly formatted: There is another solution:
If the function is read like s = 2*t^4-7*cos(t)+exp(-2*t)
"s = 2*t^4 - 7*cos(t) + e^{-2t}"
close all,
clear all,
clc,
syms t
s = 2*t^4 - 7*cos(t) + exp(-2*t)
disp('Distance: s(t) = 2*t^4 - 7*cos(t) + exp^(-2*t)');
disp('Velocity: v = ds/dt = ');
v = diff(s)
disp('Acceleration: a = dv/dt = ');
a = diff(v)
t = 2.3;
A = subs(a,t);
disp(['Acceleration at t=2.3 = ',num2str(A)]);
Matlab Output:
s = 2*t^4-7*cos(t)+exp(-2*t)
Distance: s(t) = 2*t^4 - 7*cos(t) + exp^(-2*t)
Velocity: v = ds/dt = 8*t^3+7*sin(t)-2*exp(-2*t)
Acceleration: a = dv/dt = 24*t^2+7*cos(t)+4*exp(-2*t)
Acceleration at t=2.3 = 122.3363
>>
Comments
Leave a comment