Different Substitution for Solving an Integral

  • #1
12Element
11
1
TL;DR Summary
Asking about multiple approaches for integration by substitution with an integral involving the reciprocal of a square root of a quadratic equation.
I have a question about how to solve the following integral: ##\int \frac 1 {x\sqrt{3x^2+2x-1}}dx##, I know how to get the right answer (which agrees with WolframAlpha and the book I got the question from) through substituting ##\frac 1u## for ##x##, completing the square and finally doing a trig substitution. However, I'm not sure why I'm not getting the right answer with the below approach, I would appreciate it if someone looks at my solution and tell me where and why I'm wrong.
$$ \int \frac 1 {x\sqrt{3x^2+2x-1}}dx$$
Using the below substitution:
$$3x^2+2x-1=3\left( t-x \right)^2$$
$$3x^2+2x-1=3t^2-6tx+3x^2$$
$$6tx+2x=3t^2+1$$
$$x=\frac {3t^2+1}{6t+2}$$
The derivative of ##x## with respect to ##t## is:
$$\frac {dx}{dt} = \frac {6t \left( 6t+2 \right) - 6 \left( 3t^2+1 \right)} {\left( 6t+2 \right)^2} = \frac {36t^2+12t-18t^2-6} {\left( 6t+2 \right)^2}$$
$$dx = \frac {6 \left( 3t^2+2t-1 \right)} {\left( 6t+2 \right)^2}dt$$
Also, to find the value of ##t##:
$$3x^2+2x-1=3\left( t-x \right)^2$$
$$\sqrt {3x^2+2x-1}=\sqrt{3}\left( t-x \right)$$
$$t= \frac {\sqrt {3x^2+2x-1}}{\sqrt{3}} + x$$
To find the value of ##\sqrt {3x^2+2x-1}## in terms of ##t##:
$$\sqrt {3x^2+2x-1}=\sqrt{3}\left( t-x \right)$$
substituting for ##x## with the value derived above:
$$\sqrt {3x^2+2x-1}=\sqrt{3}\left( t-\frac {3t^2+1}{6t+2} \right)=\sqrt{3}\left( \frac {6t^2+2t-3t^2-1}{6t+2} \right)$$
$$\sqrt {3x^2+2x-1}=\sqrt{3}~ \frac {3t^2+2t-1}{6t+2} $$
Substituting back into the original integral:
$$ \int \frac 1 {x\sqrt{3x^2+2x-1}}dx = \int \frac {\frac {6 \left( 3t^2+2t-1 \right)} {\left( 6t+2 \right)^2}}{\frac {3t^2+1}{6t+2} \sqrt{3}~ \frac {3t^2+2t-1}{6t+2}}dt= \frac6{\sqrt{3}}\int\frac1{3t^2+1}dt $$
$$= \frac2{\sqrt{3}}\int\frac1{t^2+ \frac13}dt = \frac2{\sqrt{3}}\sqrt{3} \tan^{-1} \left(\sqrt{3} t\right) + C$$
Substituting back for ##t## with ##x##:
$$= 2\tan^{-1} \left[ \sqrt{3}\left( \frac {\sqrt {3x^2+2x-1}}{\sqrt{3}} + x\right) \right] + C$$
$$= 2\tan^{-1} \left( \sqrt{3x^2+2x-1} + \sqrt{3}x \right) + C$$
 
Last edited:
Physics news on Phys.org
  • #2
For comparison, what is the right answer you got first ?
 
  • #3
12Element said:
I would appreciate it if someone looks at my solution and tell me where and why I'm wrong.
You're not wrong: both integrals are the same, they just differ by a constant!
Using Mathematica, your original indefinite integral is given by:$$I\equiv\int\frac{1}{x\sqrt{3x^{2}+2x-1}}dx=-2\tan^{-1}\left(\frac{\sqrt{3x^{2}+2x-1}}{3x-1}\right)+C\tag{1}$$whereas using your substitution it evaluates to:$$I_{S}\equiv2\tan^{-1}\left(\sqrt{3x^{2}+2x-1}+\sqrt{3}x\right)+C_{S}\tag{2}$$(Incidentally, Mathematica's change-of-variable operation agrees with your substitution and the form of the resulting integral.) Taking the difference of (1) and (2) and performing some algebra (or what's easier, just graphing the difference vs. ##x##) shows that:$$
I-I_{S}=C-C_{S}=\begin{cases}
\frac{2\pi}{3} & \left(x<\frac{1}{3}\right)\\
-\frac{4\pi}{3} & \left(x>\frac{1}{3}\right)
\end{cases}\tag{3}
$$
 
  • Like
Likes dextercioby and 12Element
  • #4
anuttarasammyak said:
For comparison, what is the right answer you got first ?
The answer can be in either form ##\ -sin^{-1} \left(\frac{1-x}{2x} \right)+C= \ -2tan^{-1} \left( \frac {\sqrt{3x^2+2x-1}}{3x-1} \right)+C ##.

renormalize said:
Taking the difference of (1) and (2) and performing some algebra (or what's easier, just graphing the difference vs. ##x##) shows that:$$
I-I_{S}=C-C_{S}=\begin{cases}
\frac{2\pi}{3} & \left(x<\frac{1}{3}\right)\\
-\frac{4\pi}{3} & \left(x>\frac{1}{3}\right)
\end{cases}\tag{3}
$$
Thanks a lot, this is really interesting, I only have a Casio calculator and whenever substituting random values in both solution does not give the same number I assume my solution is wrong. I only thought that hidden constants are associated with logarithmic functions, now I know they can be more devious than what I thought. Not to mention improper integrals (like in this case) where multiple constants can be present along the domain. Thanks again.
 
  • #5
Thanks. I let wolfram draw the graphs.
https://www.wolframalpha.com/input?i=plot+y=-+arcsin+(+(1-x)/(2x))
1728687812256.png



The right answer for x<0 needs -1 to be multiplied.
https://www.wolframalpha.com/input?i=plot+y=-+sgn(x)+arcsin+(+(1-x)/(2x))
1728697512563.png

So for x<-1
[tex]\int_x^{-1} \frac{dt}{t\sqrt{3t^2+2t-1}}=-\sin^{-1}\frac{1-x}{2x}-\frac{\pi}{2}[/tex]
for 1/3 <x
[tex]\int_{1/3}^x \frac{dt}{t\sqrt{3t^2+2t-1}}=-\sin^{-1}\frac{1-x}{2x}+\frac{\pi}{2}[/tex]

https://www.wolframalpha.com/input?i=plot+y=-2+arctan+(+\sqrt(3x^2+2x-1)/(3x-1))

1728685909493.png

So for x<-1
[tex]\int_x^{-1} \frac{dt}{t\sqrt{3t^2+2t-1}}=2\tan^{-1}\frac{\sqrt{3x^2+2x-1}}{3x-1}[/tex]
for 1/3 <x
[tex]\int_{1/3}^x \frac{dt}{t\sqrt{3t^2+2t-1}}=-2\tan^{-1}\frac{\sqrt{3x^2+2x-1}}{3x-1}+\pi[/tex]


https://www.wolframalpha.com/input?i=plot+y=2+arctan+(+\sqrt(3x^2+2x-1)+\sqrt(3)x+)
1728686188858.png


So for x<-1
[tex]\int_x^{-1} \frac{dt}{t\sqrt{3t^2+2t-1}}=-2\tan^{-1}(\sqrt{3x^2+2x-1}+\sqrt{3}x)-\frac{2\pi}{3}[/tex]
for 1/3 <x
[tex]\int_{1/3}^x \frac{dt}{t\sqrt{3t^2+2t-1}}=2\tan^{-1}(\sqrt{3x^2+2x-1}+\sqrt{3}x)-\frac{\pi}{3}[/tex]
 
Last edited:
  • #6
12Element said:
I only thought that hidden constants are associated with logarithmic functions, now I know they can be more devious than what I thought.

An antiderivative of zero on a disconnected domain is constant on each connected component of the domain. but the constants on different connected components don't have to be equal. Here, the domain of the integrand as a real function is [itex](-\infty, -1) \cup (\frac13,\infty)[/itex] which is disconnected.
 
  • Like
Likes SammyS
  • #7
As noted in post #5
For the two different expressions are same we expect the relation
[tex]\tan^{-1} (\sqrt{(3x-1)(x+1)}+\sqrt{3}x) + \tan^{-1} \frac{\sqrt{(3x-1)(x+1)}}{3x-1}=-\frac{\pi}{3}[/tex]
[tex]\tan(\tan^{-1} (\sqrt{(3x-1)(x+1)}+\sqrt{3}x) + \tan^{-1} \frac{\sqrt{(3x-1)(x+1)}}{3x-1})=-\sqrt{3}[/tex]
for x<-1
[tex]\tan^{-1} (\sqrt{(3x-1)(x+1)}+\sqrt{3}x) + \tan^{-1} \frac{\sqrt{(3x-1)(x+1)}}{3x-1})=\frac{2\pi}{3}[/tex]
[tex]\tan(\tan^{-1} (\sqrt{(3x-1)(x+1)}+\sqrt{3}x) + \tan^{-1} \frac{\sqrt{(3x-1)(x+1)}}{3x-1})=-\sqrt{3}[/tex]
for x>1/3
They are same. By tan addition law I have checked that it is valid.
 
Last edited:
Back
Top