# Physics and Mathematics as an ai tool

Physics and mathematics:

This topic discusses results concerning physics and mathematics base questions.

This tool is very excellent for research, concerning many topics which are related to physics. It is also a great tool for performing mathematical problems and simulation of answers.

There is, however, a problem which occurs in physics based mathematical problems. This is some sort of function of unit conversion, and the loss of decimal places.

Simple experimental interactions involving standard equations, can result in errors of up to a factor of 6.

This situation should be considered in future updates:

Hey Champ,

And welcome to the community forum, I’m always happy to see people interested science

Large language models, like GPT-3, are primarily designed to process and generate natural language text, such as articles, essays, and stories. They are not specifically trained or optimized to solve mathematical or physical problems.

large language models are probabilistic in nature and operate by generating likely outputs based on patterns they have observed in the training data. In the case of mathematical and physical problems, there may be only one correct answer, and the likelihood of generating that answer may be very low. This can result in large language models producing incorrect or nonsensical results when attempting to solve complex problems.

large language models excel at natural language, not math and physics.

If you want to use GPT or other LLM’s for complex math and physics, you will have to help the model by telling it the correct answer.

You may want to use the Wolfram plugin when it rolls out.

1 Like

Yeah, I’m personally very excited about the wolfram plugin, wolfram alpha is an amazing tool already!
(Stephen, if you read this, know that I would love to test your plugin)

The wolfram plugin will definitely help with mathematics, but GPT will still have problems with various physics problems, like this one:

You’re driving on your way home, in your car there’s groceries and helium balloon, you hit a tree and everything in the car flies forward.

what happens to the ballon?

The correct answer is that balloon move towards the rear of the car. GPT will answer forward because we told it so.

Right, GPT is trained on internet data, which isn’t always reliable.

Very true, but the internet is not necessarily wrong, there’s this scientific phenomenon called “wisdom of the crowd” meaning if you increase the number of people guessing then you’ll get closer to the actual result.

In this case we also told GPT that “everything flies forward”, which is generally true, the ballon only goes the other way because it’s filled with helium.

I’ve done a similar experiment with a helium balloon on a train and can confirm that it moves the opposite way of everything else Good day,
I have seen a few examples of how to prompt for complex math word problems using GPT on the openai cookbook GitHub, which is a repository of useful tips and tricks for working with GPT models. You can find it here: GitHub - openai/openai-cookbook: Examples and guides for using the OpenAI API. One thing I learned from there is that you need to be very specific and clear when asking GPT to solve math problems, and use proper symbols and units. For example, if you want to calculate the force of gravity between two objects, you could prompt GPT like this:

`Calculate the force of gravity between two objects with masses m1 = 10 kg and m2 = 5 kg, separated by a distance of r = 2 m. Use the universal gravitational constant G = 6.67 x 10^-11 N m^2 / kg^2.`

One interesting thing to explore that I started playing with is instead of asking these complex questions, you can get GPT to create simulations for your data sets, and then use the specific model to generate the answers. For example, if you have a data set of measurements of the position and velocity of a projectile over time, you can get GPT to fit a quadratic function to the data and then use that function to predict the maximum height, range, and time of flight of the projectile. I have been using the GPT-3 model for this purpose, but you could also try other models like GPT-J or GPT-Neo. This way, you can avoid the problem of unit conversion and loss of decimal places that sometimes occurs in physics based mathematical problems.

It’s definitely true that you can prompt GPT in a different way to produce the more mathematical looking results, but they’re still generated on the basis of being the most probable response, not through physical or mathematical reasoning. In your example you mentioned that:

When you have GPT create simulations for you it’s not doing the actual math, it’s either guessing or writing code that you can run to calculate the answer.

The simulations GPT writes can be hit and miss, I’ve had it create 10 simulations of the collapse of a quantum wave function. I included the exact equations in Tex format.

Only one of these simulations actually gave the correct results, all the other just looked correct at a glance.

Sorta like MMO Pong. But what if the real pong ball was infrared and you needed special goggles to see it? That’s what happens sometimes, the crowd doesn’t know. Especially anything technical or science related. Which is why GPT sucks at math or physics, and needs a legit plugin to even be reasonable in these areas!

1 Like

Just had to go and look up MMO pong, great example!

I agree that we need a plugin for physics and such, I think wolfram will solve the problem of actually calculating most of the mathematical problems leaving us with the problem of actual reasoning.

As an example there’s quite a few statistical mechanics problems where you would have to decide to apply approximations along the way or the mathematical results will just explode.

The question here is:
Can we get GPT to replicate reasoning?

I’m inclined to say yes, just like I can guide students through solving problems

I think so, if the neural network structure was improved. Right now it is based on probabilities of words following previous words. So it’s not that smart. But what if the information was a set of facts, represented in a graph, where the edges connect other facts to one another in some logical manner. This would be an example of “reasoning”, maybe?

This is what graph based machine learning is. There are no doubt other powerful forms, but the words cannot simply be probabilities, like it is with most of these big LLM’s, there needs to be some logic.

1 Like

I think GPT would be able to do enough reasoning based on semantics to phrase the problem in a way that could be solved by wolfram.

The connections between facts actually do exist within GPT’s massive set of training data, the question is just how to separate the facts from all the junk

I did some further digging on the wolfram plugin (the /.well-known directory is publicly available)

So while I’m not able to test the wolfram plugin, I can still see roughly how it works.

It’s really interesting because GPT is actually in charge of formulating the problem in a way that the wolfram API can understand. So i decided to test GPT’s ability to do this with the prompt.

What is the optimal power of a tumble dryer? Let’s think step by step.

In this example GPT correctly identifies that the first step is to identify the physical quantities related to the problem, but fails to do this properly, it identifies the volume of the drum and drying time as being relevant and formulates it’s equation based on that.

Wolfram won’t be able to solve this one correctly since GPT (both 3.5 and 4) formulates the problem using the wrong input parameters.

An induction motor with flux control in the rotor has the parameters R2 = 0.150 Ω, L2 = 0.09 H, and operates at a magnetizing current of lm = 4A and a torque current of lt = 25A. The pulsation of the rotor currents, w2, is?

1 Like

Hi, welcome to the developer forum!

It looks like you want to try ChatGPT, you can do so by visiting https://chat.openai.com

1 Like

I want solution of this.

From the water works a straight, horizontal pipeline leads 10oC water to the city. The length of
the pipeline is 3km, the diameter 500 mm and roughness k=0,6 mm. The pressure in the city
water network is 8 bar (abs.). How big is the pressure needed at the water works to give a flow
of 1200 m3/h?

# Topic : Mathematical Formula Teacher

## Message From You:

From the water works a straight, horizontal pipeline leads 10oC water to the city. The length of
the pipeline is 3km, the diameter 500 mm and roughness k=0,6 mm. The pressure in the city
water network is 8 bar (abs.). How big is the pressure needed at the water works to give a flow
of 1200 m3/h?

## Message From ChatGPT (models : gpt-3.5-turbo-16k-0613):

To calculate the pressure needed at the water works to give a flow of 1200 m³/h, we can use the Darcy-Weisbach equation, which relates the pressure drop in a pipe to the flow rate, pipe characteristics, and fluid properties.

The Darcy-Weisbach equation is given by:

ΔP = (f × (L/D) × (ρ × V²))/2

Where:
ΔP is the pressure drop (in Pa)
f is the Darcy-Weisbach friction factor
L is the length of the pipeline (in meters)
D is the diameter of the pipeline (in meters)
ρ is the density of the water (in kg/m³)
V is the velocity of the water (in m/s)

First, let’s convert the given values to the appropriate units:
Length of the pipeline = 3 km = 3000 m
Diameter of the pipeline = 500 mm = 0.5 m
Flow rate = 1200 m³/h
Density of water at 10°C = 999.7 kg/m³ (approximately)
Pressure in the city water network = 8 bar (abs.) = 8 × 10^5 Pa

Now, we need to calculate the velocity of the water using the flow rate and the cross-sectional area of the pipe:

Velocity (V) = (Flow rate)/(Cross-sectional area)
Cross-sectional area = π × (D/2)²

Substituting the values:
Cross-sectional area = π × (0.5/2)² = 0.19635 m²
Velocity (V) = (1200 m³/h) / (3600 s/h) / (0.19635 m²) ≈ 0.1809 m/s

Next, we need to calculate the friction factor (f) using the Colebrook-White equation, which takes into account the roughness of the pipe:

1/√f = -2 × log10((k/3.7D) + (2.51/(Re √f)))

Where:
k is the roughness of the pipe (in meters)
Re is the Reynolds number

To calculate the Reynolds number (Re), we use the formula:

Re = (ρ × V × D) / μ

Where:
μ is the dynamic viscosity of water at 10°C (approximately 1.307 × 10^(-3) Pa·s)

Substituting the values:
Re = (999.7 kg/m³ × 0.1809 m/s × 0.5 m) / (1.307 × 10^(-3) Pa·s) ≈ 690,014

Now, we can solve the Colebrook-White equation iteratively to find the friction factor (f). We start with an initial guess for f and iterate until we reach a desired level of accuracy. Let’s assume an initial guess of 0.02 for f.

Using an iterative method, we find that the friction factor (f) is approximately 0.0198.

Now we can calculate the pressure drop (ΔP) using the Darcy-Weisbach equation:

ΔP = (f × (L/D) × (ρ × V²))/2
ΔP = (0.0198 × (3000 m) / (0.5 m) × (999.7 kg/m³ × (0.1809 m/s)²))/2 ≈ 9,875 Pa

Finally, to find the pressure needed at the water works, we add the pressure drop to the pressure in the city water network:

Pressure at the water works = Pressure in the city water network + Pressure drop
Pressure at the water works = 8 × 10^5 Pa + 9,875 Pa ≈ 8,098,750 Pa

Therefore, the pressure needed at the water works to give a flow of 1200 m³/h is approximately 8,098,750 Pa.

Would this be available for the API currently? Anyway to juice the api to make it a math professor?

Actually, this is already available the wild  Yeah you can now get Wolfram alpha access is via plugin through the Plugins ecosystem in ChatGPT.

1 Like