How to solve mechanics problem when acceleration depends on position.

951 Views Asked by At

I'm curious about how problems such as the following are typically solved analytically, or in computer simulations such as games engines for 2D physics. It seems a bit harder than the typical constant acceleration scenario.

Suppose a particle with mass m is free to move inside a smooth 2D basin given by the curve $y=x^2$. Given some initial conditions, such as position $(x_0, x_0^2)$, the problem is to determine the position of the particle at time $t$.

The particle is always subject to a gravitational force $(0, -mg)$. The other force acting on it is the reaction from the basin, which has magnitude $mg$, and direction given by the unit normal to the basin at the current position, $\hat{\mathbf{n}}(x)$.

Solving for position at time $t$ requires integrating the velocity, and thus the acceleration, up until time $t$. But the acceleration at time $t$ depends on the current position to obtain the normal vector. So it is not clear to me (or I have forgotten) how this can be solved analytically.

As well as the question of how this would be solved analytically, I'm also interested in how this may typically be implemented in simulation software. It seems like if you went for a finite element method, however small your time step, you would be moving out of contact with the basin if you took steps along the tangent vector.

1

There are 1 best solutions below

1
On BEST ANSWER

You can observe that: $$V=mgy=mgx^2$$ and the kinetic energy can be written as: $$T=\frac{1}{2}mv^2=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)$$ Bacause you know: $y=x^2$, you get: $\dot{y}=\frac{dy}{dx}\dot{x}=2x\dot{x}$ So you can write the Eulero Lagrange equations putting $L=T-V$ (Lagrangian): $$\frac{d}{dt}\frac{\partial L}{\partial \dot{x}}-\frac{\partial L}{\partial x}=0$$ Writing this equation you get a nonlinear differential equation and if you are luky you can obtain an analytical expression for $x(t)$ and so for $y(t)$