David's Blog

Living a quiet life in Coquitlam, B.C.

Name:
Location: Coquitlam, British Columbia, Canada

Sunday, February 15, 2026

Testing AI Tools with a Integral Calculus Task

All this AI buzz got me curious, so I decided to test out some of the products out there by using them to solve for an antiderivative.

This problem looks at one aspect of my previous work involving elliptical motion. See the diagram below.


When a body revolves around a centrally-directed force, it sweeps out a constant area per unit time. In the case of an ellipse, this motion can be described in polar coordinates with origin based on the major axis at the focus of the motion (e, 0). The radial vector that sweeps out the motion, rη, is a function of the angle eta (η) measured relative to the major axis:


To simplify work, a will be set equal to 1 (it can be scaled appropriately as needed; the hard part is solving for position as a function of time). In addition, the same values will be used as in previous posts: T = 2*π time units and e = 0.786151377748.

The area of the entire ellipse is π a b. In the present case, since a = 1, this area is

Aellipse = π √(1 - e2)

One quarter of this area is

Aquarter-ellipse = π √(1 - e2) / 4

See the following diagram.


In this post, I am going to find the area when rη is at the semi-latus rectum point; in other words, when η = π/2 and rη = 1 - e2. See the following diagram.

Note that this area is NOT the same as the area for one-quarter of the ellipse--unless e = 0 (i.e., it's a circle).
This area can be calculated in at least four ways. Ideally, I'd like to find an expression that does not involve a trigonometric function.

1) Knowing that equal area is swept out in equal time, dA/dt = constant:

dA/dt = Aellipse / T = π √(1 - e2)/(2*π) = √(1 - e2)/ 2

The time at which this happens is tp = E - e sin(E) = arccos(e) - e √(1 - e2)

So, Atp = tp * dA/dt
    = 0.5 * √(1 - e2) * [π/2 - arcsin(e) - e √(1 - e2)]
    = 0.0557377539689 units of area.

2) Because η = π/2, the rη vector is a vertical straight line, and standard integration with cartesian coordinates can be used.

The antiderivative of this function is

Evaluating this antiderivative at the endpoints to get the definite integral yields

Evaluated, Atp = 0.0557377539689 units of area.
This number is the same as that found just above.
Note that this expression highlights the fact that
as e goes to 0, Atp goes to Aquarter-ellipse.

3) This area can also be found by computing the definite integral of the original equation in polar coordinates. The area swept out by a vector defined in terms of a polar equation is given as follows:

In the present case, the definite integral is

The 0.5 and (1 - e2)2 factors are constant, so they can be taken out of the integrand, leaving an integral of the form

This integral is not straightforward to solve. Its antiderivative can be derived, but I looked it up in a table of antiderivatives (the good old CRC Handbook):

The antiderivative of the integral in this antiderivative, call it I2, can be expressed in two ways.

However, one of those ways includes the term √(b2 - a2). But because in the present context (for elliptical motion 0 < e < 1) b is always less than a that would yield an imaginary result. So we are left with the following result:

Subbing in a = 1 and b = e the definite integral finally becomes

Now the two constant factors that were removed, 0.5 and (1 - e2)2, can be put back and the area of the region of interest is

Unfortunately, the expressions for Atp seem to be getting more complicated--and there is still the presence of a trigonometric function.

Plugging in the numbers, Atp = 0.0557377539689 units of area.
This number is the same as found above, so this number is verified.

Here is where AI came in. I asked several of the AI programs two questions:

(i) what is the antiderivative of the original polar equation for area, and
(ii) what is the definite integral of the original polar equation for area.

Most of them did not provide an answer. Those that did were wrong.


This post does not cover new ground, I haven't discovered anything new. But I have found some weaknesses of the current crop of AI products.

Labels: , , ,