2

Working on $\displaystyle \int \frac 1 {p \sin ax + q \cos ax + \sqrt {p^2 + q^2} }\mathrm{d}x$.

According to Spiegel's "Mathematical Handbook of Formulas and Tables" (Schaum, 1968) item $14.422$ it should work out as:

$$\frac {-1} {a \sqrt {p^2 + q^2} } \tan \left({\frac \pi 4 - \frac {ax + \arctan (q/p)} 2}\right)$$

First thing I do is a Weierstrass substitution: $u = \tan \dfrac {a x} 2$ which leads (after algebra) to the expression:

$$\dfrac 2 {a (\sqrt {p^2 + q^2} - q) } \int \frac {\mathrm d u} {\left({u + \dfrac p {\sqrt {p^2 + q^2} - q} }\right)^2}$$

This is a standard integral, giving (again after algebra):

$$\frac {-2} {(\sqrt {p^2 + q^2} - q) u + p}$$

Replacing $u = \tan \dfrac {a x} 2$ gives us:

$$\frac {-2} {(\sqrt {p^2 + q^2} - q) \tan \dfrac {a x} 2 + p}$$

which is worlds away from what the book gives.

I can't reconcile the two expressions. I'm fairly sure of the exactness of the square on the bottom, because it's the result of a quadratic in $u$ with a discriminant of zero. Fiddly and messy, but ultimately tractable.

I have tried deriving the expression in the book w.r.t. $x$ but all I get is a complicated and daunting squared-secant expression which may work out in the end to what I started with, but eugh.

How on earth does one arrive at Spiegel's result?

(Sidenote: It's a special case of this integral:

$$\displaystyle \int \frac {\mathrm d x} {p \sin a x + q \cos a x + r} = \begin{cases} \dfrac 2 {a \sqrt {r^2 - p^2 - q^2} } \arctan \left({\dfrac {p + (r - q) \tan \dfrac {a x} 2} {\sqrt {r^2 - p^2 - q^2} } }\right) + C & : p^2 + q^2 < r^2 \\ \dfrac 1 {a \sqrt {p^2 + q^2 - r^2} } \ln \left| {\dfrac {p - \sqrt {p^2 + q^2 - r^2} + (r - q) \tan \dfrac {a x} 2} {p + \sqrt {p^2 + q^2 - r^2} + (r - q) \tan \dfrac {a x} 2} }\right| + C & : p^2 + q^2 > r^2 \end{cases}$$

but where the discriminant equals zero and so cannot be used.)

Ottavio
  • 2,287
Prime Mover
  • 5,005
  • I get the same result as you and can't see the mistake (except that you forget a $a$ int $\frac {-2} {(\sqrt {p^2 + q^2} - q) u + p}$). But Spiegel's expression seems strange... – math Dec 31 '20 at 16:31
  • 1
    @math As you can see from Quanto's analysis, it lends itself to a straightforward integration once it has been massaged into a workable format. Getting to there from here may be challenging. – Prime Mover Dec 31 '20 at 16:39

1 Answers1

4

Integrate as follows

\begin{align} & \int \frac {dx} {p \sin ax + q \cos ax + \sqrt {p^2 + q^2} }\\ =&\frac1{\sqrt {p^2 + q^2} } \int \frac {dx} {\cos(\tan^{-1}\frac pq -ax)+1 }\\ =&\frac1{\sqrt {p^2 + q^2} } \int \frac {dx} {\cos(\frac\pi2-ax -\tan^{-1}\frac qp )+1 }\\ =&\frac1{2\sqrt {p^2 + q^2} } \int \sec^2\left(\frac\pi4-\frac {ax+\tan^{-1}\frac qp}2\right)dx\\ =&-\frac1{a\sqrt {p^2 + q^2} } \tan\left(\frac\pi4- \frac {ax+\tan^{-1}\frac qp}2\right)+C\\ \end{align}

Quanto
  • 97,352
  • Thank you -- although I am going to need to do some hard thinking to perform the algebraic manipulations that you provided. Algebra is good for the soul. Not many more of those nightmare integrations left in Spiegel to do. – Prime Mover Dec 31 '20 at 16:38
  • @PrimeMover - good to hear that you almost there taming Spiegel‘s – Quanto Dec 31 '20 at 16:40
  • About 30 to go, a handful of which are merely finishing off the negative $x$ case, and some involve mucking about with infinite series. There may still be one or two questions to be asked on StackExchange. We will see. – Prime Mover Dec 31 '20 at 17:23
  • 1
    Finally got there. It took me a while, I needed to think hard about the trig identities needed. – Prime Mover Jan 07 '21 at 09:48