Integration with trig substitution Trying to evaluate this using trig substitution:
$$\int \frac {1}{49x^2 + 25}\mathrm{d}x $$
Here's how I'm going about it, using $x = 5/7(\tan\theta)$
$$\int \frac {1}{49\left(x^2 + \frac{25}{49}\right)}\mathrm{d}x $$
$$=\int \frac {1}{49\left(\frac{25}{49}\tan^2\theta + \frac{25}{49}\right)} \mathrm{d}\theta$$
$$=\int \frac {1}{(25\tan^2\theta + 25)} $$
$$=\int \frac {1}{25(\tan^2\theta + 1)}\mathrm{d}\theta $$
$$=\int \frac {1}{25\sec^2\theta}\mathrm{d}\theta $$
$$=\int \frac {\cos^2\theta}{25}\mathrm{d}\theta $$
$$=\frac{1}{50}(\theta + \sin\theta + \cos\theta) $$
To generalize for $x$, $\theta = \arctan(7x/5)$
$$\frac{1}{50}\left(\arctan\left(\frac{7x}{5}\right) + \sin\left(\arctan\left(\frac{7x}{5}\right)\right) + \cos\left(\arctan\left(\frac{7x}{5}\right)\right)\right) $$
$$\frac{1}{50} \left(\frac{7x}{5\left(\frac{49x^2}{25}+1\right)} + \arctan\left(\frac{7x}{5}\right)\right)$$
But taking the derivative of this gets me:
$$ \frac{35}{(49x^2 +25)^2}$$
Where is my mistake?
 A: Welcome to MSE. The issue is that you left off $dx$:
$$\int \frac1{49x^2 + 25} dx = \int \frac1{49(5/7\tan(\theta))^2 + 25} d(5/7 \tan(\theta) = \frac57\int \frac1{25\tan^2(\theta) + 25} \sec^2(\theta)d\theta = \cdots $$
A: We can calculate a more general integral of the form
$$I =\int\frac{1}{a^2x^2+b^2}\,\mathrm{d}x.$$
In your example $a=7$ and $b=5$. First of all do the non-trigonometrical substitution $u=ax/b$. That will give you
$$\int\frac{b}{a(b^2u^2+b^2)}\,\mathrm{d}x=\frac{1}{ab}\int\frac{1}{u^2+1}\,\mathrm{d}u.$$
You should be familiar with this integral. It's equal to $\arctan u$. Substituting back yields
$$I = \dfrac{\arctan(ax/b)}{ab}+C.$$
A: You could also evaluate the integral in this way:
$$\int \frac {1}{49x^2 + 25}dx=\frac1{49}\int\frac1{x^2+(\tfrac57)^2}dx$$
By knowing that $\int\frac{1}{x^2+a^2}dx=\frac1a\tan^{-1}(\frac xa)$ we have:
$$\frac1{49}\int\frac1{x^2+(\tfrac57)^2}dx=\frac1{49}\times\frac75\tan^{-1}\left(\frac{7x}{5}\right)+C=\frac1{35}\tan^{-1}\left(\frac{7x}5\right)+C$$
