I have a hollow bar with outer diameter d1 and inner diameter d2. One end of the bar is fixed and the other is subjected load. Due to this load bending stress are generated in the bar and it is given by \begin{align} \sigma=\frac{M c}{I_{xx}} \label{eq:stress} \end{align} I am interested in reducing this stress for any given value of M. The form of c and Ixx is given by \begin{align*} c=\frac{d_{o}}{2};\quad I_{xx}=\frac{\pi (r_{o}^4-r_{i}^4)}{4} \end{align*} The outer and the inner radius r1 and r2 are related by below equation \begin{align} r_{o}-r_{i}=t \label{eq:const} \end{align} Now my objective is to minimize the stress σ. which I have written as f such that the constraint is satisfied \begin{align} f&=\frac{4Mr_{o}}{\pi(r_{o}^4-r_{i}^4)}\\ \end{align}

d1 = 2*r1;(*outer diameter*)
d2 = 2*r2;(*Inner diameter*)
aixx = Simplify[(π (d1^4 - d2^4))/64];
sigmax = Simplify[(M*r1)/aixx];
f = sigmax; (*opjective function*)
r1 = r2 + t; 
Minimize[{f, r1}, {r2, t}]
  • $\begingroup$ Your g is not a constraint, and t is not defined. $\endgroup$
    – Hausdorff
    Commented Aug 6, 2020 at 14:50
  • $\begingroup$ @Hausdorff actually r1 and r2 are related by t. and I have slightly modified the OP is that OK $\endgroup$
    – acoustics
    Commented Aug 6, 2020 at 14:53
  • 1
    $\begingroup$ You don't need the constraint anymore, you can just write Minimize[f, {r2, t}] $\endgroup$
    – Hausdorff
    Commented Aug 6, 2020 at 14:58
  • $\begingroup$ @Hausdorff I am getting wired results. I don't know whether I have framed the problem properly or not. Could you suggest any changes in the problem statement $\endgroup$
    – acoustics
    Commented Aug 6, 2020 at 15:01
  • 2
    $\begingroup$ I don't know what problem you are trying to solve, maybe you could elaborate a bit in your question. $\endgroup$
    – Hausdorff
    Commented Aug 6, 2020 at 15:06

1 Answer 1


I am guessing you were trying to achieve:

d1 = 2*r1;
d2 = 2*r2;
aixx = Simplify[(\[Pi] (d1^4 - d2^4))/64];
sigmax = Simplify[(M*r1)/aixx];
f = sigmax
Simplify @ Minimize[{f, r1 == r2 + t && t > 0 && r2 > 0}, {r2}]


Simplify @ Minimize[{f, r1 == r2 + t && t > 0 && r2 > 0}, {r2, t}]

if you also want to minimize w.r.t. the thickness.

  • $\begingroup$ Could able to interpret the obtained result. I am beginner in optimization. could you briefly tell me what to understand the result $\endgroup$
    – acoustics
    Commented Aug 6, 2020 at 15:37
  • $\begingroup$ @acoustics The result is, frankly, bogus. I think you need to re-think the problem itself because it's probably ill-defined right now. $\endgroup$ Commented Aug 6, 2020 at 15:42

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.