Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Solving Task Using Derivative | Mathematical Analysis
Mathematics for Data Analysis and Modeling

book
Challenge: Solving Task Using Derivative

Tarefa

Swipe to start coding

You have the position function that describes the dependency between the coordinate of the moving point and the time during which this point moves. Your task is to determine the velocity and acceleration functions and calculate the values in the point t=5.

  1. Use the derivative of the first order to determine velocity function.
  2. Use the derivative of the second order to determine acceleration function.
  3. Calculate velocity value at the moment t=5.

Solução

import sympy as sp

# Define the time variable
t = sp.symbols('t')

# Define the position function
s = 5*t**3 - 2*t**2 + 3*t + 1

# Calculate the velocity and acceleration
v = sp.diff(s, t) # Velocity
a = sp.diff(s, t, 2) # Acceleration

# Evaluate the velocity and acceleration at t = 5
point = {t:5}
v_5 = v.subs(point)

# Print the velocity and acceleration
print(f'Velocity: {v}')
print(f'Acceleration: {a}')

# Print the velocity and acceleration at t = 5
print(f'Velocity at t = 5: {v_5}')

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 3
import sympy as sp

# Define the time variable
t = sp.___('t')

# Define the position function
s = 5*t**3 - 2*t**2 + 3*t + 1

# Calculate the velocity and acceleration
v = sp.___(s, ___) # Velocity
a = sp.diff(s, t, ___) # Acceleration

# Evaluate the velocity at t = 5
point = {t:5}
v_5 = v.___(___)

# Print the velocity and acceleration
print(f'Velocity: {v}')
print(f'Acceleration: {a}')

# Print the velocity and acceleration at t = 5
print(f'Velocity at t = 5: {v_5}')
toggle bottom row
some-alt