4
$\begingroup$

Consider the following integral:

$$I = \frac{1}{\pi c^2} \int\limits_{r=0}^c 2 \pi r\ e^{-\frac{ \left( \sqrt{a^2 - r^2} -\sqrt{b^2 - r^2} \right)}{\lambda}}\ dr$$

under the conditions $a>b>c>0$ and $\lambda > 0$ are all in $\mathbb{R}$.

This problem is too difficult for Mathematica (v. 11.3) to solve directly:

Assuming[a > b > c > 0 && λ > 0,
 1/(π c^2) Integrate[
   2 π r Exp[- (Sqrt[a^2 - r^2] - Sqrt[b^2 - r^2])/λ], 
   {r, 0, c}]
 ]

However, if one makes the substitution $k = \sqrt{a^2 - r^2} - \sqrt{b^2 - r^2}$, then one gets the following integral:

$$\frac{2}{c^2} \int\limits_{k = a - b}^{\sqrt{a^2 - c^2} - \sqrt{b^2 - c^2}} \left( \frac{(a^2 - b^2)^2}{k^3} - k \right)\ e^{-k/\lambda}\ dk$$

This integral can be broken up and solved analytically, where Mathematica employs the

$$E_q (x) - \int\limits_1^\infty \frac{e^{-x t}}{t^q}\ dt$$

which Mathematica implements as ExpIntegralE[q,x].

I accept that finding this $k$ substitution requires "intelligence" that Mathematica does not yet have. But assume the user has this insight and wants to give it as a hint or condition to Mathematica. Hence the core of my question:

Question

In the integral for $I$, defined above, how would the user impose the $k$ substitution as a "hint" and have Mathematica perform all the substitutions (including differentials and limits) and produce an analytic solution for $I$?

$\endgroup$
2
  • $\begingroup$ I think this is just a change of integration variable. One approach is demonstrated in mathematica.stackexchange.com/questions/125471/… $\endgroup$
    – mikado
    Commented May 11, 2021 at 22:06
  • $\begingroup$ @mikado: That is clearly a valuable substitution function, but when I applied it to my integral I got lots of unevaluated InverseFunction calls, which alas didn't solve my problem. Next steps? $\endgroup$ Commented May 12, 2021 at 0:53

1 Answer 1

2
$\begingroup$

This is an extended comment. I hope that the author of the OP will find it useful.

Michael E2 has provided some wonderful code for changing integration variables.

From said code we try

substitute[
 Integrate[
  1/(π c^2) 2 π r Exp[-(Sqrt[a^2 - r^2] - 
        Sqrt[b^2 - r^2])/λ], {r, 0, c}], 
 k -> Sqrt[a^2 - r^2] - Sqrt[b^2 - r^2]]

which gives

output

and an error. The error -I think- should not concern us as we have the ordering $a>b>c>0$ and also $\lambda>0$ and all parameters are in the $\mathbb{R}$ domain.

We grab the integrand and we hit it with Factor, PowerExpand and FullSimplify like so:

-(1/(c^2 k))
      E^((-Sqrt[
      a^2 - (-a^4 + 2 a^2 b^2 - b^4 + 2 a^2 k^2 + 2 b^2 k^2 - k^4)/(
       4 k^2)] + Sqrt[
     b^2 - (-a^4 + 2 a^2 b^2 - b^4 + 2 a^2 k^2 + 2 b^2 k^2 - k^4)/(
      4 k^2)])/λ)
     Sqrt[-a^4 + 2 a^2 b^2 - b^4 + 2 a^2 k^2 + 2 b^2 k^2 - 
     k^4] (-((4 a^2 k + 4 b^2 k - 4 k^3)/(
       4 k Sqrt[-a^4 + 2 a^2 b^2 - b^4 + 2 a^2 k^2 + 2 b^2 k^2 - 
         k^4])) + 
      Sqrt[-a^4 + 2 a^2 b^2 - b^4 + 2 a^2 k^2 + 2 b^2 k^2 - k^4]/(
      2 k^2)) // Factor // PowerExpand // FullSimplify

output2

Sanity check: do the change of variables under the integral. This takes care of everything except for the integration limits. We have

sltn = Solve[k == Sqrt[a^2 - r^2] - Sqrt[b^2 - r^2], r]

Refine[1/(π c^2) 2 π r Exp[-(Sqrt[a^2 - r^2] - 
           Sqrt[b^2 - r^2])/λ] Dt[r] /. sltn[[1]], 
    SetAttributes[a, Constant] && SetAttributes[b, Constant]] // 
   Factor // PowerExpand // FullSimplify

output3

And of course, as is mentioned in the OP the integration works and the answer is given in terms of the exponential integral function

Assuming[a > b > c > 0 && λ > 0, 
 Integrate[(((a^2 - b^2)^2 - k^4)/k^3) E^((-a^2 + b^2)/(
   k λ)), {k, a - b, Sqrt[a^2 - c^2] - Sqrt[b^2 - c^2]}]]

out4

$\endgroup$
1
  • 1
    $\begingroup$ Yes... helpful. Thanks. ($+1$) $\endgroup$ Commented Mar 26, 2022 at 1:36

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.