How can I find the optimal shape of a cantilever beam subject only to its own weight, and having the following restrictions?

  • The cross section is a rectangle
  • Only the height of the rectangle can vary along the length of the beam
  • Euler-Bernoulli beam theory is used
  • Optimal in this case means that fibers at the extremes of any cross section at any position x will be used at 100%, so they will reach the yield strength of the material, ie $\sigma=\frac{M}{I}y_{max}=\sigma_y$
  • The only load acting on the beam is that originated due to the weight of the material itself
  • The beam is assumed to fail due to bending only, so vertical shear stresses will be ignored

I am only interested in the analytical solution, without regards for production challenges, costs ecc.


I am an engineering student and out of curiosity I am trying to find optimal shapes of beams subject to different load conditions, such that for each cross section the variable dimension cannot be any smaller or the material will yield. I managed to easily get the solutions for point load with variable base and variable height, but this one is giving me troubles.

What I tried

Attempt 1

I started with the following scheme:

I assumed the load q(x) to be unknown because it is given by the cross section. The second moment of area I(x) is also unknown.

By following the logic depicted in the image below

I computed the load q(x) as:

$$ q(x) = \frac{dF}{dx} = \rho g b h(x) g \frac{dx}{dx} = \rho g b h(x)$$

I computed the bending moment at a random point x due to the load on the right portion of the beam as:

$$M(x) = \int_0^{M(x)}dM = \int_0^{L-x}q(t) \cdot t \, dt = \int_0^{L-x}\rho b g h(t)\cdot t \, dt$$

And the second moment of area I(x):

$$I(x) = \frac{bh(x)^3}{12}$$

To finally get the stress at the extreme fibers that I then impose equal to the yield strength, $\sigma=\sigma_y$

$$ \begin{aligned} \sigma & = \frac{M(x)}{I(x)} \cdot y_{max} \\ & =\frac{\int_0^{L-x}\rho g b h(t)\cdot t \, dt}{\frac{bh(x)^3}{12}} \cdot \frac{h(x)}{2} \\ & =\frac{6 \rho g \int_0^{L-x} h(t)\cdot t \, dt}{h(x)^2} \\ & = \sigma_y \end{aligned} $$

At this point I try to differentiate the expression to eliminate the integral and get a differential equation which is usually easier to deal with than integral equations (I used Leibniz rule to differentiate under integral sign):

$$ \begin{aligned} \sigma_y h(x)^2 & = 6 \rho g \int_0^{L-x} h(t)\cdot t \, dt \\ \frac{d}{dx}\left[ \sigma_y h(x)^2 \right] & = \frac{d}{dx} \left[ 6 \rho g \int_0^{L-x} h(t)\cdot t \, dt \right] \\ 2 \sigma_y h(x)h'(x) & = -6 \rho g \cdot h(L-x)\cdot (L-x) \end{aligned} $$

And the problem is that I don't know how to solve this differential equation where h has two different arguments, first x, then L-x. I tried thinking about substitutions but they just seem to move the problem to another place.

Attempt 2

Another thing I tried is choosing the origin at the tip of the beam, with the beam that goes towards the right this time. I followed the same procedure shown above and I managed to get another equation, but this time I got the following:

$$ \sigma_y h(x)^2 = 6 \rho g \int_0^x h(t) \cdot (x-t) \, dt $$

I differentiated once both sides and got:

$$ 2 \sigma_y h(x) h'(x) = 6 \rho g \int_0^x h(t) \, dt $$

Then differentiated again and got:

$$ 2 \sigma_y [h(x) h''(x) + h'(x)^2] = 6 \rho g h(x) $$

$$ h(x) h''(x) + h'(x)^2 - \frac{3 \rho g}{\sigma_y} h(x) = 0 $$

Which is a nonlinear 2dn order ODE, but again I am a bit stuck with the solution of it as I am a bit rusty with ODEs and I don't know if this is an equation that can be solved nicely or if it could keep me up all day.


2 Answers 2


Red is beam depth blue is stress

Red is beam depth blue is stress. That's a numerical solution that's why it goes silly at the tip

  • $\begingroup$ Thank you for the answer. What equations did you use to simulate the beam? I was just fiddling with the differential equations I got and the more I try the more I am convinced no nice analytic result exists. Wolfram alpha suggests an analytic solution using the hypergeometric function, but that doesn't make things too easier for me. I can accept a numerical solution as an answer as long as I have the right equations to reproduce it. $\endgroup$ Commented Jul 17, 2023 at 10:00
  • $\begingroup$ I wasn't very surprised to find that the curve of the beam depth is a parabolic. I was going to do a numerical optimisation but my intuition led me to the right place,. It's just M/I = sigma/y, and working out M for each station. $\endgroup$ Commented Jul 17, 2023 at 10:10

You are overthinking.

Since the only variable is "h" (b & L = constant), so

$w = \rho*b*h$

$M_\max = \dfrac{w*L^2}{2} = \dfrac{\rho*b*h*L^2}{2}$

$I = \dfrac{b*h^3}{12}$

Given, $\sigma= \dfrac{M*y}{2I} = \dfrac{M*h/2}{2I} = \dfrac{\rho*b*h*L^2}{2}*\dfrac{h}{2}*\dfrac{6}{b*h^3} = \dfrac{3\rho L^2}{2h} = \sigma_y$

Solve, $h_{max} = \dfrac{3\rho L^2}{2\sigma_y}$ ($\rho, L, \sigma_y$ are knowns)

Note, I think the equation $\sigma= \dfrac{M*y}{2I}$ is a mistake. For the given shape, the flexural stresses on the extreme fibers are $\dfrac{M*y}{I}$, in which $y = \pm h/2$, measured from the neutral axis.

enter image description here

  • $\begingroup$ Thank you for your answer. I understand what you are suggesting, but I am looking for the optimal shape where the fibers at the extremes of the cross section are yielding, for any cross section at any point x, not just for the cross section at the constraint. I will explicitly add this to the question. You are right about y/2, I'll edit the post to correct the mistake. $\endgroup$ Commented Jul 13, 2023 at 18:44
  • $\begingroup$ Then you shall set up equations for a cantilever beam with varying depths from the tip to the support - trapezoidal along the length of the beam. The only difference from the above is the equation for the varying self-weight Good luck. $\endgroup$
    – r13
    Commented Jul 13, 2023 at 19:21
  • $\begingroup$ It's more of a mathematical challenge than an engineering one. At any point x M/I=s/y, where s is constant, and I= 1/12 * b *8*y^3 $\endgroup$ Commented Jul 14, 2023 at 10:28
  • $\begingroup$ and M is nasty. $\endgroup$ Commented Jul 14, 2023 at 10:34
  • $\begingroup$ and you need one more constraint otherwise y=0 is a solution. $\endgroup$ Commented Jul 14, 2023 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.