How do I integrate acceleration function to get velocity?

7 次查看(过去 30 天)
Hello everyone,
I'm trying to solve the following question using matlab.
A particle is fired vertically downwards with a velocity of 30 m/s in a fluid. Due to the resistance of the fluid, the particle experiences a deceleration equal to: a=-0.7v^3
if I want to obtain the velocity function I know I must integrate it using int(fun) but I'm not sure how to use it or how to set conditions.
I appreciate the help.

回答(1 个)

Alok Nimrani
Alok Nimrani 2018-2-16
Hi Noor Abdulrahman,
Using the particle deceleration, a = dv/dt = -0.7(v^3), we have:
- dv/(0.7*v^3) = dt
Now, the initial velocity of the particle is 30 m/s i.e. v0 = 30 for t = 0. Assuming the velocity to be 'v' m/s at time instant 't', you can integrate:
  • left hand side of the above equation over the range 30 to 'v', and
  • right hand side of the equation over the range 0 to 't'
Please have a look at the following code for better understanding:
>> syms v t; % creating symbolic variables v and t
>> eqn = int(-1/(0.7*v^3), v, 30, v) == int(1, t, 0, t); % 'eqn' represents the equation obtained after integrating both sides
>> solve(eqn, v) % solving the above equation with respect to variable v
In this code, the ‘int(expr, var, lower, upper)’ function arguments are:
• Expression to integrate,
• Variable over which to integrate,
• Lower and upper limits of the integral
Hope this helps you.
Thanks

类别

Help CenterFile Exchange 中查找有关 Fluid Dynamics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by