Finding derivatives of vector function for numerical integration

In summary, a vector function is a mathematical function that takes inputs and outputs a vector. Derivatives of vector functions are important for numerical integration, and can be found using the chain rule or other techniques. Applications of finding derivatives of vector functions include physics, engineering, and computer graphics. However, there are limitations to using derivatives for numerical integration, such as assuming continuity and differentiability of the function and potential computational complexity.
  • #1
graffy76
4
0
Hello,

I have a math problem that I think I've worked out properly, but I'm not entirely sure. The explanation is a bit lengthy, but I don't want to miss anything that might be pertinent.

Essentially, I have a force equation F(t) that describes the acceleration of a body in two dimensions (F=ma, assuming unit mass).

The body position, velocity, and acceleration are then calculated using Gear's predictor-corrector method (a method that's popular in molecular dynamics circles, as I understand it).

The Gear predictor portion is a fifth order Taylor expansion on Newton's equations for curvlinear motion:

x[n+1] = x[n] + h*v[n] + ((h^2)/2)a[n] + ((h^3)/6)B[n] + ((h^4)/24)C[n]
v[n+1] = v[n] + h*a[n] + ((h^2)/2)B[n] + ((h^3)/6)C[n]
a[n+1] = a[n] + h*B[n] + ((h^2)/2)C[n]
B[n+1] = B[n] + h*C[n]

where:

B[n] and C[n] are the first and second derivatives of the acceleration (F(t)).
[n] indicates the value calculated in the nth timestep
[n+1] indicates the predictor value (calculated before the next timestep).
h is the timestep width (in my case, 0.1 seconds).

My force equation:

F(t) = (v * e(t)) / tau

where:

v = velocity scalar constant
tau = time constant

e(t) vector indicating direction of travel from a current position vector (x) to a desired position vector (p).

e(t) = (p - x) / ||p - x||

The trick is to convert an instantaneous vector function to one that is defined with respect to time (t) or in this case, timestep (h).

The current position (x) is the only part of e(h) that varies with time. Since it describes displacement, I chose to describe it using Newton's equations thusly:

x(h) = x[n] + hv[n] + ((h^2)/2)a[n]

Substituting x(h) in for x in e(h) results in a vector function that looks like this (expanded):

e(h) (numerator):
( p[x] - x[n] - hv[x][n] - ((h^2)/2)a[x][n] ) i +
( p[y] - y[n] - hv[y][n] - ((h^2)/2a[y][n] ) j

e(h) (denominator):
sqrt( (( p[x] - x[n] - hv[x][n] - ((h^2)/2)a[x][n] ) ^2 ) i +
((p[y] - y[n] - hv[y][n] - ((h^2)/2)a[y][n] ) ^2 ) j )

the first derivative, (dF(h) / dh) = B[h]:

B[h] (numerator):
[ ( -v[x][n] - h*a[x][n] )i + ( -v[y][n] - h*a[y][n] ) j ] * (v / tau)

B[h] (denominator):
sqrt ( (( -v[x][n] - h* a[x][n] ) ^2 ) i +
(( -v[y][n] - h*a[y][n] ) ^2 ) j )

the second derivative, (d2F(h) / dh2) = C[h]:

C[h] (numerator):
[ (-a[x][n]) i + (-a[y][n]) j ] * (v / tau)

C[h] (denominator):
sqrt ( (-a[x][n]^2) i + (-a[y][n]^2) j )

The big trick was figuring out how to convert an instantaneously-derived vector function to one that is defined with respect to time, which is why x became x(t) (or x(h)). Having done that, I simply want to make sure that finding the first and second derivatives was as straight-forward as it appeared to be.

I'm pretty sure this is how to do it - I don't see really any other way to get what I need to implement a fifth-order Gear solution. However, I must admit Calculus and Physics were learned in excess of ten years ago for me, and they're hardly necessary disciplines in my current line of work, so I'm a bit rusty.

Any comments or thoughts? Any help is greatly appreciated.

Thanks.

Joel
 
Physics news on Phys.org
  • #2



Hello Joel,

Thank you for sharing your math problem and explanation. It seems like you have put a lot of thought and effort into this problem and your solution looks sound to me. However, I would recommend double checking your calculations and equations to make sure there are no errors. Also, if possible, it would be beneficial to run some simulations to test your solution and make sure it produces accurate results. It's always good to have some real-world data to validate your mathematical model.

Additionally, I would suggest seeking feedback from other experts in the field of molecular dynamics or numerical methods. They may be able to provide some insights or suggestions on your approach.

Overall, it seems like you have a good understanding of the concepts and equations involved in solving this problem. Keep up the good work and don't hesitate to reach out for help or clarification if needed. Good luck!


 

Related to Finding derivatives of vector function for numerical integration

1. What is a vector function?

A vector function is a mathematical function that takes one or more inputs and outputs a vector (a set of values with magnitude and direction). It can be represented as a set of component functions, each corresponding to one of the dimensions of the vector.

2. Why is it important to find derivatives of vector functions for numerical integration?

Derivatives of vector functions are important for numerical integration because they allow us to calculate the rate of change of a vector function at a specific point. This information is crucial for accurately approximating the value of the function at a given point using numerical integration methods.

3. How do you find the derivatives of a vector function?

To find the derivatives of a vector function, you can use the chain rule for derivatives. This involves taking the derivative of each component function and multiplying it by the derivative of the variable that it depends on. You can also use the product rule and quotient rule if the vector function involves multiplication or division of multiple component functions.

4. What are some common applications of finding derivatives of vector functions?

Finding derivatives of vector functions has many applications in fields such as physics, engineering, and computer graphics. It is used to calculate velocities and accelerations in motion problems, determine the direction and rate of change of a force, and model the movement of objects in 3D space.

5. Are there any limitations to using derivatives of vector functions for numerical integration?

One limitation of using derivatives of vector functions for numerical integration is that it assumes the function is continuous and differentiable. This may not always be the case in real-world scenarios, and other methods may need to be used. Additionally, finding derivatives of highly complex vector functions can be computationally intensive and may require advanced mathematical techniques.

Similar threads

  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
1K
Replies
61
Views
1K
  • Differential Equations
Replies
1
Views
782
Replies
7
Views
2K
  • Differential Equations
Replies
1
Views
695
  • Differential Equations
Replies
2
Views
2K
  • Differential Equations
Replies
4
Views
2K
Replies
1
Views
1K
Replies
2
Views
352
Back
Top