# `int costheta/(3+2sintheta+sin^2theta) d theta` Use integration tables to find the indefinite integral.

Indefinite integral are written in the form of `int f(x) dx = F(x) +C`

where: `f(x) ` as the integrand

`F(x) ` as the anti-derivative function

`C`  as the arbitrary constant known as constant of integration

The evaluate the given integral problem: `int cos(theta)/(3+2sin(theta)+sin^2(theta)) d theta` , we may apply u-substitution by letting: `u =sin(theta)` then `du = cos(x) dx` .

Plug-in `u =sin(theta)` then `du = cos(x) dx` , the integral becomes:

`int cos(theta)/(3+2sin(theta)+sin^2(theta)) d theta =int (cos(theta) d theta)/(3+2sin(theta)+sin^2(theta))`

`=int (du)/(3+2u+u^2) orint (du)/(u^2+2u+3)`

It resembles a formula from table of integrals:

`int 1/(ax^2+bx+c) dx = 2/sqrt(4ac-b^2)arctan((2ax+b)/sqrt(4ac-b^2)) +C`

By comparing `ax^2+bx+c` with `u^2+2u+3` , we have: `a=1` , `b =2`and `c=3` .

Plug-in the values on the integral formula, we get:

`int (du)/(u^2+2u+3) =2/sqrt(4(1)(3)-(2)^2)arctan((2(1)u+2)/sqrt(4(1)(3)-(2)^2)) +C`

`=2/sqrt(12-4)arctan((2u+2)/sqrt(12-4)) +C`

`=2/sqrt(8)arctan((2u+2)/sqrt(8)) +C`

`=2/(2sqrt(2))arctan(2(u+1)/(2sqrt(2))) +C`

`= 1/sqrt(2)arctan((u+1)/sqrt(2))+C`

Plug-in ` u =sin(theta)` on `1/sqrt(2)arctan((u+1)/sqrt(2))+C` , we get the indefinite integral as:

`int cos(theta)/(3+2sin(theta)+sin^2(theta)) d theta= 1/sqrt(2)arctan((sin(theta)+1)/sqrt(2))+C`