so im supposed to get the integral of $$ \int \frac{(1+\sec(x))^2 }{\sec(x)} $$
my solution is
$$= \int \frac{1 + 2\sec (x) + \sec^2(x)}{\sec(x)} dx$$
$$= \int \frac{dx}{\sec (x)} + \int 2\,dx + \int\sec(x) \, dx$$
$$= \int \cos(x)\,dx + \int 2\,dx + \int\sec(x)\,dx$$
$$= \sin(x) + 2x + \ln|\sec(x)+\tan(x)| + C $$
I don't understand why when I double check my answers using an integral solver it doesnt seem to add up
your integrand is equivalent to $$\frac{1+\cos(x)^2+2\cos(x)}{\cos(x)}$$ use the substitution $$\cos(x)=\frac{1-t^2}{1+t^2}$$ and $$dx=\frac{2\,dt}{1+t^2}$$ this is the so called tan half substitution. your result $$\ln \left( \sec \left( x \right) +\tan \left( x \right) \right) +2\, x+\sin \left( x \right) $$ is right.