# Math Help - Primitive function

1. ## Primitive function

Hi!

Problem: Find the primitive function to

$\int \frac{1}{sin^{2}(x)+2cos^{2}(x)} \; dx$

Solution attempt:

I tried the substitution $t = tan\left(\frac{x}{2}\right)$ , which gives us $sin(x)=\frac{2t}{1+t^{2}} \; , \; cos(x)=\frac{1-t^{2}}{1+t^{2}} \mbox{ and } dx = \frac{2}{1+t^{2}}dt$

Substituting into the integral I got (if I haven´t done any algebraic mistake)

$\int \frac{1+t^{2}}{1+t^{4}}\; dt$

And this is where I am stuck.

Thx

2. $
\int \frac{1}{sin^{2}(x)+2cos^{2}(x)} \; dx
$

divide every term by $cos^2x$

$
\int \frac{sec^2(x)}{tan^{2}(x)+2} \; dx
$

and then substitute $tanx=t$

$
\int \frac{1}{t^2+2} \; dx
$

3. Hi

Thank you! This solution is like a million times easier.

4. Hello, Twig!

Another approach . . . but malaygoel's is the best!

Find the primitive function to: . $\int \frac{1}{\sin^2\!x+2\cos^2\!x}\,dx$

The denominator is: . $\sin^2\!x + 2\cos^2\!x \;=\;\frac{1-\cos2x}{2} + 2\!\cdot\!\frac{1+\cos2x}{2} \;=\;\frac{3+\cos2x}{2}$

The integral becomes: . $2\int\frac{dx}{3+\cos2x}$

Let $t \:=\:\tan x \quad\Rightarrow\quad dx \:=\:\frac{dt}{1+t^2}\quad\Rightarrow\quad \cos 2x \:=\:\frac{1-t^2}{1+t^2}$

Substitute: . $2\int\frac{\frac{dt}{1+t^2}}{3 + \frac{1-t^2}{1+t^2}} \quad\Rightarrow\quad \int\frac{dt}{2+t^2} \quad\Rightarrow\quad \frac{1}{\sqrt{2}}\arctan\left(\frac{t}{\sqrt{2}}\ right) + C$

Back-substitute: . $\frac{1}{\sqrt{2}}\arctan\left(
\frac{\tan x}{\sqrt{2}}\right) + C$