Solving a Basic Physics Problem in MATLAB: Finding Object's Position at t=10s

  • Thread starter Thread starter CR3
  • Start date Start date
  • Tags Tags
    Matlab Physics
Click For Summary

Discussion Overview

The discussion revolves around solving a physics problem using MATLAB, specifically finding the position of an object at t=10s based on given velocity data. The problem involves concepts of calculus, numerical integration, and MATLAB programming.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant expresses difficulty with the problem due to a lack of calculus knowledge and seeks help on how to approach it using MATLAB.
  • Another participant suggests that acceleration is not needed and proposes calculating distance using the average of the velocities over each time interval, likening it to a basic distance formula (d = vt).
  • This second participant introduces the concept of trapezoidal integration as a method for estimating the total distance traveled by summing the areas of trapezoids formed by the velocity data.
  • A later reply clarifies that to find distance, one must integrate the velocity rather than differentiate it to find acceleration, emphasizing the importance of numerical integration techniques.

Areas of Agreement / Disagreement

There is no consensus on the best approach to solve the problem, as participants present differing methods and perspectives on the necessity of acceleration in the calculations.

Contextual Notes

The discussion reflects varying levels of familiarity with calculus and numerical methods, which may affect the proposed solutions. Some assumptions about the applicability of certain methods are not fully explored.

CR3
Messages
2
Reaction score
0

Homework Statement



Problem from: A Concise Introduction to MATLAB (McGraw Hill)

pg. 346 # 6

A certain object moves with the velocity v(t) given in the table below:
Determine the object's position x(t) at t= 10s if x(0)= 3

Time (s) = [0,1,2,3,4,5,6,7,8,9,10]

Velocity (m/s) = [0,2,5,7,9,12,15,18,22,20,17]

Homework Equations





The Attempt at a Solution



I am having trouble with this problem because I have not had Calculus yet. I think it is a pretty basic Calculus problem but I have very little prior knowledge of Calculus so if anyone could explain this to me I would really appreciate it.

The only way I can think to solve it using what I do know is use the diff(v)./diff(t) equation in MATLAB to find the acceleration and then use the equation x(t) = x(0) + v(0)t + .5at^2 but I am not sure how to type this into MATLAB.

Thanks so much for your help.
 
Physics news on Phys.org
CR3 said:

Homework Statement



Problem from: A Concise Introduction to MATLAB (McGraw Hill)

pg. 346 # 6

A certain object moves with the velocity v(t) given in the table below:
Determine the object's position x(t) at t= 10s if x(0)= 3

Time (s) = [0,1,2,3,4,5,6,7,8,9,10]

Velocity (m/s) = [0,2,5,7,9,12,15,18,22,20,17]

Homework Equations





The Attempt at a Solution



I am having trouble with this problem because I have not had Calculus yet. I think it is a pretty basic Calculus problem but I have very little prior knowledge of Calculus so if anyone could explain this to me I would really appreciate it.

The only way I can think to solve it using what I do know is use the diff(v)./diff(t) equation in MATLAB to find the acceleration and then use the equation x(t) = x(0) + v(0)t + .5at^2 but I am not sure how to type this into MATLAB.

Thanks so much for your help.
You're going the wrong way - you don't need the acceleration. From the listed velocity values you can calculate distance the object has traveled. As a very simple example, if a car's velocity is 60 mi/hr and it travels at that velocity for two hours, then its position is 120 mi. from its starting position (d = vt).

Your problem is a little more complicated, but not too much more. You are given the instantaneous velocities at each second. At t = 0, v = 0. At t = 1, v = 2. I would estimate the distance as the average of the two velocities, and then multiply by the time elapsed.

Distance (first second) [itex]\approx[/itex] (v(1) - v(1))/(t(1) - t(0)] = (2 - 0)/(1 - 0) = 2. Do the same thing for each 1-second interval, and then add up all of the distances. That will give you the total distance the object has traveled.
 
Thank you so much! This is so helpful!
 
What I've suggested is called trapezoidal integration, since you are in effect calculating the area of a bunch of trapezoids.

To get the acceleration, you take the derivative of the velocity, but to get the distance, you integrate the velocity. There are many techniques for numerical integration, of which the trapezoid method is just one.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K