Trig substitution integral

$$\frac{5}{2}\ln({\frac{x^2 + 4}{4}}) + \frac{1}{2}\arctan({x/2}) + c_1 \neq \frac{5}{2}\ln(x^2 + 4) + \frac{1}{2}\arctan(x/2) + C$$

Note that $$\frac{5}{2}\ln\left({\frac{x^2 + 4}{4}}\right) = \frac 52 \ln\left(x^2 + 4\right) - \frac 52 \left (\ln 4\right) = \frac 52 \ln(x^2 + 4) + c_2$$

So put $c_1 + c_2 = C$. Then the answers are equal. Solutions to an integral consist of a family of solutions $F(x) + C$, which differ only by a constant. That is, if $F(x) + C$ is the solution after computing an intregral, so is $F(x) + C_i$, for any constant $C_i \neq C$.

In short, you're both correct!


The first approach is easier in fact: $$ I= \int \frac{(5x +1)dx}{x^2+4}=I_1 + I_2 $$ where $$ I_1 = \int\frac{5x dx}{x^2+4}\\ I_2 = \int \frac{dx}{x^2+4} $$ hence, $$ I_1 = \frac{5}{2} \int \frac{2xdx}{x^2+4} = \frac{5}{2} \int \frac{d(x^2+4)} {x^2+4}=\frac{5}{2} \log( x^2 +4) +C_1 $$ In fact you can see that the numerator is a derivative of the denominator. $$ I_2 = \int \frac{dx}{x^2+ 2^2} = \frac{\arctan(\frac{x}{a})}{a} +C_2 $$ This approach is more efficient as it does not require you to make any substitutions/