4

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$?

bmf
  • 15,157
  • 2
  • 26
  • 63
David G. Stork
  • 41,180
  • 3
  • 34
  • 96
  • I think this is just a change of integration variable. One approach is demonstrated in https://mathematica.stackexchange.com/questions/125471/change-integration-variable – mikado May 11 '21 at 22:06
  • @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? – David G. Stork May 12 '21 at 00:53

1 Answers1

2

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

bmf
  • 15,157
  • 2
  • 26
  • 63