Using Matlab to solve dynamics problem

In summary, the conversation discusses a problem set in which the instructor used the Pythagorean theorem to find the acceleration of a particle. The equation written is a differential equation that can be solved to find the acceleration by solving for db/dt^2. In Matlab, the equations can be solved using the ode45() or dsolve() commands.
  • #1
spin360
13
0
I've attached my problem set. I'm having an issue on how to write the formula to insert it into matlab. According to the problem set, dl/dt = 0.2m/s. I actually have the "solution" to the problem, though I don't understand why the answer is what it is. Basically, my instructor used the pythagorean theorem and set l[tex]^{2}[/tex] = b[tex]^{2}[/tex] + [tex]^{2}[/tex]. He then differentiated twice w.r.t time, hence dc/dt going to 0 (c is constant) and the second derivative of dl/dt going to 0 as well (dl/dt constant). The end result is d[tex]^{2}[/tex]b/dt[tex]^{2}[/tex] = (dl/dt)[tex]^{2}[/tex] - (db/dt)[tex]^{2}[/tex]. a (acceleration) is the second deriv of b evidently. Can anyone tell me the reason behind differentiating twice, also how I could possibly use that formula in matlab? Thanks.
 

Attachments

  • me.JPG
    me.JPG
    34.6 KB · Views: 515
Physics news on Phys.org
  • #2
Your instructor used the Pythagorean theorem because he was trying to find the acceleration of the particle, which is the second derivative of position. The equation he wrote is a differential equation that can be used to find the acceleration by solving for db/dt^2. In Matlab, you can use either the ode45() or dsolve() commands to solve the differential equation and find the acceleration.
 
  • #3


I understand your confusion about the solution to your dynamics problem. Let me try to break it down for you in a way that will hopefully make more sense.

First, let's look at the formula that your instructor used: l^{2} = b^{2} + ^{2}. This is a representation of the Pythagorean theorem, which states that in a right triangle, the square of the length of the hypotenuse (l) is equal to the sum of the squares of the other two sides (b and ^).

Next, your instructor differentiated this formula twice with respect to time (t). This is because your problem involves dynamics, which is the study of how objects move and change over time. By differentiating twice, your instructor is essentially finding the acceleration (a) of the object, which is the second derivative of the position (b) with respect to time.

Now, let's look at the resulting formula: d^{2}b/dt^{2} = (dl/dt)^{2} - (db/dt)^{2}. This formula represents the acceleration (a) of the object, which is equal to the square of the velocity (dl/dt) minus the square of the acceleration (db/dt). This is a common formula used in dynamics problems to find the acceleration of an object.

To use this formula in Matlab, you will need to define the variables (l, b, and ^) and their initial values. Then, you can use the "diff" function to differentiate the formula twice with respect to time. Finally, you can plug in the values for the velocity (dl/dt) and acceleration (db/dt) to solve for the acceleration (a).

I hope this explanation helps you understand the reasoning behind your instructor's solution and how to use the formula in Matlab. Good luck with your problem set!
 

1. What is Matlab and how is it used to solve dynamics problems?

Matlab is a programming language and numerical computing environment commonly used in scientific and engineering applications. It allows users to perform various calculations and simulations to solve complex dynamics problems. Matlab also has a wide range of built-in functions, toolboxes, and visualization tools that make it efficient and user-friendly for solving dynamics problems.

2. Can Matlab be used to solve all types of dynamics problems?

Yes, Matlab can be used to solve a variety of dynamics problems, including but not limited to, kinematics, kinetics, and control systems. Its powerful computational and visualization capabilities make it suitable for analyzing and solving complex dynamics problems in various fields such as engineering, physics, and biology.

3. How does Matlab handle numerical errors in dynamics problem solutions?

Matlab has built-in functions that allow users to handle and reduce numerical errors in their solutions. These functions include error control techniques such as adaptive time-stepping and advanced algorithms for solving differential equations. Additionally, Matlab also provides tools for error analysis and visualization of results, making it easier to identify and troubleshoot any numerical errors.

4. Can Matlab be used for real-time simulations of dynamics problems?

Yes, Matlab has the ability to perform real-time simulations of dynamics problems. Its Simulink tool allows users to create dynamic models and simulations of systems in real-time. This feature is particularly useful for testing and analyzing the behavior of complex systems and can aid in the design and optimization of various engineering and scientific processes.

5. Is it necessary to have prior coding experience to use Matlab for solving dynamics problems?

While prior coding experience can be helpful, it is not necessary to use Matlab for solving dynamics problems. Matlab has a user-friendly interface and syntax, and its functions and toolboxes can be easily accessed and used without extensive coding knowledge. Additionally, there are numerous online resources and tutorials available to help beginners learn how to use Matlab for solving dynamics problems.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Replies
3
Views
935
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
41
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
935
Back
Top