Mathematical modeling in Physics Engineering, Biological and Social Science with QwQ LLM from China

Large language model (LLM) is a language model notable for its ability to achieve general-purpose language generation. Mathematics language in Physics turns nature into numbers,differential or difference equations. This note takes rocket science example to noted that non-linear differential equation model formulation taking from [1].

At time of writing, a model QwQ, an experimental research model focused on advancing AI reasoning capabilities from a helpful assistant created by Alibaba Cloud[2], hooks people attention for Qwen2.5. QwQ is 32 billion parameters, showcases impressive analytical capabilities.

In the following note, we deploy the model on Ollama to check performance on Physics modeling for non-linear differential equation of basic rocket science which are reflecting probability up coming World War expansion.

Environment setup framework is base ‘open-webui’ locally[3,4] with NVIDIA RTX GPU or A100. Goal to motivate apply LLM to be assitant modeller in complex mathematical modeling in Engineering, Physical, Biological and Social Science by apply common language in Mathematics not just calculator.

Prompt:

“You are physicist, try to model Rocket Launch: The motion of the rocket is influenced by the trust generated by it and the force acting on it due to its interaction with each and other celestial bodies. To start, let us assume that the forces due to interaction with celestial bodies are insignificant. This is process of simplification. With this assumption a description of the problem can be done in terms of a closed system with two objects, the rocket and the earth, each interacting with the other.

The variable characterizing the rocket are its position and velocity with respect to some fixed point on the each and the thrust generated by the rocket. We can regard the point from where the rocket is launched as the fixed point. If we assume that the rocket is launched to move in a vertical direction, the position of the rocket is described by a single variable which changes with time as the rocket moves.

Let \(x(t)\) denote the altitude of the rocket at time t with t=0 corresponding to the instant at which the rocket launched.

The velocity is given by \(x′(t)\), the time derivative of \(x(t)\).

Let \(F(t)\) represent the thrust generate by the rocket in its upward motion. Since the motion of the rocket is governed by the laws of dynamics, the accerleration of the rocket \(x′′(t)\), the time derivative of \(x′()\), is influenced by the following three forces:

  1. \(F(x)\) : thrust generated by the rocket,

  2. \(G\): gravitational force of attraction,

  3. \(f\): frictional retarding force. The direction in which these forces act on can differ depending on whether the rocket is going up or down. In case of upward motion, direction of f or frictional retarding force is downward. In the opposite, rocket going down, f is upward.

In general, the thrust F(t) is of constant magnitude F_m and acting for a relatively short period in relation to the time token to reach the maximum altitude. Which one is best model for time t, continuous or discrete time ?

Hint: of inverse square raw for gravitational attraction and we acknowledge friction force \(f\) depend on velocity \(x'(t)\) as well as the density of air, which varies with the position x(t). We assume the density variation can be ignored, the frictional force varies linearly with the velocity with some constant, k. \(f=kx'(t)\), let \(M\) is mass of the rocket, \(R\) is radius of the earth, \(g_0\) is the gravitational constant. assume x(0)=0,and x’(0)=0.

What is \(Mx''(t)\)?.

Given

\[G=\frac{M g_0 R^2}{(x(t)+R)^2}\]

Response:

So I’m trying to model the motion of a rocket being launched, considering things like thrust, gravity, and friction. It’s a bit complicated, but let’s break it down step by step.

First, we’re assuming that the only significant forces acting on the rocket are the thrust from its engines, the gravitational pull from the Earth, and some friction or air resistance. We’re ignoring other celestial bodies and their influences, which is a common simplification for this kind of problem.

We’re focusing on vertical motion, meaning the rocket is going straight up or down relative to the launch point. So, we can describe its position with a single variable, x(t), which is the altitude at time t. The velocity is just the derivative of position with respect to time, x’(t), and acceleration is the derivative of velocity, x’’(t).

There are three main forces to consider:

Thrust (\(F(t)\)) : This is the force generated by the rocket’s engines, pushing it upwards. We’re told that the thrust is constant in magnitude, \(F_m\), but only acts for a short period compared to the total flight time.

Gravitational Force (G) : This is the force pulling the rocket back towards the Earth due to gravity. The problem provides an expression for gravity as .. math:: G = (M g_0 R²)/(x(t) + R)²,

which accounts for the fact that gravitational force decreases with distance from the center of the Earth.

Frictional Force (f) : This is the resistance from the air as the rocket moves through it. The problem states that we can model this force as being proportional to the velocity of the rocket, so \(f = k x'(t), where k is a constant\). Also, the direction of this force is opposite to the direction of motion. So, if the rocket is going up, friction acts downwards, and vice versa.

Given these forces, we can use Newton’s second law, which states that the net force acting on an object is equal to its mass times its acceleration:
\[\]

F_net = M x’’(t).

So, the net force F_net is the sum of the thrust, gravitational force, and frictional force. But we need to consider their directions.

When the rocket is going up:

Thrust (F_m) is upwards.

Gravity (G) is downwards.

Friction (f = k x’(t)) is also downwards because it opposes the motion.

Therefore, the net force is: .. math:

F_net = F_m - G - f

Plugging in the expressions: .. math:

F_net = F_m - [M g_0 R² / (x + R)²] - k x'

So, according to Newton’s second law: .. math:

M x'' = F_m - M g_0 R² / (x + R)² - k x'

Similarly, when the rocket is coming down:

Thrust is still upwards (assuming the engines are off once the initial thrust is applied).

Gravity is still downwards.

Friction now acts upwards because it opposes the downward motion.

So, net force would be: .. math:

F_net = F_m + G - f

But since F_m is likely zero during descent or negligible compared to gravity and friction, it might be: .. math:

F_net = M g_0 R² / (x + R)² - k x'

Again, using Newton’s second law: .. math:

M x'' = M g_0 R² / (x + R)² - k x'

Wait, but in the descending phase, if thrust is zero, it’s just gravity minus friction (which is now positive because friction acts upwards).

So, to generalize, we need to consider the direction of each force based on the velocity.

But for the initial part, where the rocket is launched upwards, we can stick with the first equation:

\[M x'' = F_m - M g_0 R² / (x + R)² - k x'\]

Given that at t=0, x(0)=0 (starting at ground level) and x’(0)=0 (initially at rest).

Now, the problem gives G = M g_0 R² / (x + R)², which is the gravitational force.

So, plugging that in: .. math:

M x'' = F_m - G - k x'

Or, substituting G: .. math:

M x'' = F_m - [M g_0 R² / (x + R)²] - k x'

This seems like a second-order nonlinear differential equation because of the term involving x in the denominator.

Solving this analytically might be challenging, so perhaps we need to make some approximations or consider specific cases.

Interpretation:

The result also show how to solve this equation but it is not verified yet. However, the model of second order non-linear equation fomulation is shown promissing result compared to analitics equations from references. - QwQ can model important concept in mathematical physics: impuse, Dirac delta function - Construct non-linear equation model from English statement. - Demostrated solving and reasoning in Mathematical application. - Milestone to teach and learn applied Mathematical modeling in undergrade level.

References:

  1. Murthy, D. N. P & Rodin, E. Y. (Ervin Y.), 1932- & Page, N. W. (1990). Mathematical modelling : a tool for problem solving in engineering, physical, biological, and social sciences / D.N.P. Murthy and N.W. Page and E.Y. Rodin. Oxford ; New York : Pergamon Press

  2. QwQ: Reflect Deeply on the Boundaries of the Unknown, QWEN team, github

  3. Deploy Open WebUI with Ollama