Claude tries beam bending
July 26, 2025 at 7:15 PM by Dr. Drang
Leon Cowle asked Claude Sonnet to solve the same beam bending problem that I recently asked ChatGPT to solve, and he sent me Claude’s answers. Like ChatGPT, Claude started off giving the correct answer, but fell down when trying to explain it. What surprised me was the differences and similarities in their wrong explanations.
Claude’s initial answer for the tip deflection of this cantilever beam,
was correct:
At the end of its initial answer it said
The factor 5/48 comes from the integration of the moment diagram over the length of the beam, accounting for the specific loading condition at the midpoint.
which is an invitation to ask it to explain the solution. When Leon did, Claude’s first sentence was a disclaimer:
I need to correct my previous answer - I made an error. Let me work through the proper derivation.
Since the previous answer was correct, this tells us to be on the lookout for mistakes in the derivation.
(And I should also mention here that Leon is using a free account, so it’s possible that the other models or “extended thinking” available through a paid account would do a better job. Still, as I said about my use of ChatGPT, what is the inducement to pay when what you see for free is error-prone?)
Unlike ChatGPT, Claude starts its derivation with correct equations for the bending moment in the beam. In the left half, ,
and in the right half, ,
This is correct, so Claude did a better job at the mechanics of the problem than ChatGPT did.1 Since Claude talked about the “moment diagram,” it’s worth showing the graph of this two-part function:
Claude then correctly recognized expressed the relationship between the moment and deflection, y:
Note the negative sign, which ChatGPT never got right.
Claude plugs in its expressions for and integrates twice to get
for the left half and
for the right half. I find it a little weird that it’s keeping the EI term attached to y instead of moving it to the other side of the equations, but it’s OK to do it this way.
And Claude is also correct in how to solve for the four constants of integration. The deflection and slope at the fixed end are zero, and the deflection and slope at the center must match. As equations (which Claude doesn’t show), these conditions are
at the fixed end and
at the center, where I’m using prime notation to represent derivatives.2
Claude doesn’t show the algebra that solves these four equations in four unknowns, nor does it give the values for , , , and . Which is a shame, because somehow, after doing everything else right, it screws up a simple algebra problem.
Instead of showing its work, Claude skips to the “solution,” which it gives as
This is not only wrong, its the same wrong answer that ChatGPT gave, albeit for different reasons, which I find quite strange.
In summary:
- Both ChatGPT and Claude gave the right answers initially.
- Both ChatGPT and Claude decided they were wrong after being asked to explain their answers.
- Surprisingly, they gave the same wrong answers even though they made different types of errors in their explanations.
Leon offered to ask Claude to explain itself further, but I think this is enough. Maybe I’ll return to this problem in another couple of years.
-
ChatGPT did get the bending moments correct in its last explanation, but its initial moments were wrong. ↩
-
If you’re reading this in Safari or Chrome, the primes are a little anemic, and you might think they’re just specks of dust on your screen. Also, they’re higher than they ought to be. Firefox does a better job, both in the readability and placement of the primes. ↩