Question

Use Python to solve each problem. 2. A particle moves according to a law of motion...

Use Python to solve each problem.

2. A particle moves according to a law of motion s = t 3 − 12t 2 + 24t, t ≥ 0.

a) Find the velocity at time t.

b) What is the velocity after 1 second?

c) When is the particle at rest?

d) Sketch the position function on t ∈ [0, 6] to determine when the particle is moving in the positive direction on that interval.

e) Find the total distance traveled in the first 6 seconds (exact and approximate).

f) Find the acceleration after 1 second and at the times found in part c).

g) Graph the position, velocity, and acceleration functions on the same set of axes for t ∈ [0, 8].

Please use Python commands.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

from sympy import *

from numpy import arange

import numpy as np

import matplotlib.pyplot as plt

t = Symbol('t')

#t 3 − 12t 2 + 24t

s = t**3 -(12*t**2) + (24*t)

sprime = s.diff(t)

print(sprime)


f = lambdify(t, sprime, 'numpy')

a = np.array([1])

print(f(a))

#solve for sprime =0 using solve function part c

roots = solve(sprime, t)

print(roots)



# d

#position at t = 6

f = lambdify(t, s, 'numpy')

a = np.array([6])

print(f(a))

#acceleration is derivative of velocity

sprimedouble = sprime.diff(t)

#display acceleration

print(sprimedouble)

#find value at 1

f = lambdify(t,sprimedouble , 'numpy')

a = np.array([1])

print(f(a))

a = np.array(roots)

print(f(a))

#plot position part d

t = np.arange(0.0, 6.0, 0.01)

s = (t**3 -(12*t**2) + (24*t))

plt.plot(t, s)

plt.xlabel('time')

plt.ylabel('Position')

plt.grid(True)

plt.savefig("positio.png")

plt.show()

#part g all 3 together

t = np.arange(0.0, 8.0, 0.01)

s = (t**3 -(12*t**2) + (24*t))

sprime = (3*t**2 -(24*t) + (24))

plt.plot(t, s)

sprimedouble = (6*t) - 24

plt.xlabel('time')

plt.ylabel('Position, velocity, acceleration')

plt.grid(True)

plt.savefig("positio.png")

plt.show()

#if you save as same fig it will overlap them on the same axis

plt.plot(t, sprime)

sprimedouble = (6*t) - 24

plt.savefig("positio.png")

plt.show()

plt.plot(t, sprimedouble)

plt.savefig("positio.png")

plt.show()

plot

last plot for all values

Add a comment
Know the answer?
Add Answer to:
Use Python to solve each problem. 2. A particle moves according to a law of motion...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A particle moves according to a law of motion s = ft), t 0, where t...

    A particle moves according to a law of motion s = ft), t 0, where t is measured in seconds and s in feet. t)-te-t2 (a) Find the velocity at time t (in ft/s) v(t) e (b) What is the velocity after 2 s? (Round your answer to two decimal places.) v(2) ft/s (c) When is the particle at rest? (d) When is the particle moving in the positive direction? (Enter your answer using interval notation.) (e) Find the total...

  • C, D, F??????? A partidle moves according to a law of motion s-t), t0, where t is measured in seconds and s in feet. (If an answer does not exist, enter DNE.) ft) - - 721t (a) Find the velocity at tim...

    C, D, F??????? A partidle moves according to a law of motion s-t), t0, where t is measured in seconds and s in feet. (If an answer does not exist, enter DNE.) ft) - - 721t (a) Find the velocity at time t -32-14 +21 ft/s (b) What is the velocity after 1 second? 1)10 ft/s (c) When is the particle at rest? t 2.33333333 | X (d) when is the particle moving in the positive direction? (Enter your answer...

  • ube Maps dll TUUTUU IVIDUS NGHI YouTube Maps 4. The motion of a particle in a...

    ube Maps dll TUUTUU IVIDUS NGHI YouTube Maps 4. The motion of a particle in a straight line is given by s(t) = 12t - where s is measured in meters and t in seconds (a) Find find the velocity and acceleration of the particle at time t (b) what is the velocity at time t = 4? If it is known that a particle moves in a positive direction when the position function is increasing: (e) when is the...

  • Problem #1 The motion of a particle is defined as x 2t3 -15t2+24t +4 where x...

    Problem #1 The motion of a particle is defined as x 2t3 -15t2+24t +4 where x is in meters and t is in seconds. Determine the following: (a) The time at which velocity is zero (b) The position and total distance traveled (not just change in position) when the acceleration is zero

  • Problem #1 (35 Points) Given The velocity of a particle as it moves along a straight...

    Problem #1 (35 Points) Given The velocity of a particle as it moves along a straight line is given by v (-12+36t-6t2) ft/s, where t is in seconds. At the initial condition ( 0), so 2 ft. Find a) The acceleration of the particle as a function of time. b) The acceleration of the particle when -6 seconds. c) The position of the particle as a function of time. d) The position of the particle when -6 seconds. e) The...

  • Solve please (2 points) Suppose that the equation of motion for a particle (where s is...

    Solve please (2 points) Suppose that the equation of motion for a particle (where s is in meters and t in seconds) is s = 3t3 - 8t (a) Find the velocity and acceleration as functions of t. Velocity at time t = Acceleration at time t = (b) Find the acceleration after 1 second. Acceleration after 1 second: (C) Find the acceleration at the instant when the velocity is 0. Acceleration:

  • A particle moves in a straight line with the acceleration shown. The particle starts from the...

    A particle moves in a straight line with the acceleration shown. The particle starts from the origin with V.=-2 m/s. Construct a) Velocity versus time and Position versus time curves for 0 <t< 18 seconds b) Determine the position and the velocity of the particle when t=18 seconds c) Determine the total distance traveled. ooo a( )

  • Student Name 1. A particle confined to motion along the x axis moves with constant acceleration...

    Student Name 1. A particle confined to motion along the x axis moves with constant acceleration fromx = 2.0 m to x 8.0 m during a 2.5-s time interval. The velocity of the particle at x - 8.0 m is 2.8 m/s. What is the acceleration during this time interval? 2. The polar coordinates of a point are r=5.50 m and Angle 240°. What are the Cartesian coordinates of this point? 3. On occasion, the notation A= [A, O] will...

  • A particle moving along the x axis in simple harmonic motion starts from its equilibrium position,...

    A particle moving along the x axis in simple harmonic motion starts from its equilibrium position, the origin, at t = 0 and moves to the right. The amplitude of its motion is 3.50cm, and the frequency is 2.30 Hz. (a) Find an expression for the position of the particle as a function of time. (Use the following as necessary: t. Assume that x is in centimeters and t is in seconds. Do not include units in your answer.) x...

  • An object moves along a line where s(t) = t^3 − 12t^2 + 36t − 30...

    An object moves along a line where s(t) = t^3 − 12t^2 + 36t − 30 (where s(t) is in feet and t in seconds). 1) When is the velocity 0? 2) When is the velocity positive? 3) When is the object moving to the left? 4) When is the acceleration positive? 5) Sketch a picture of its motion. Please label the numbers of the answers.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT