Find the maximum and minimum of a function (involving an trigonometric integral) 
Question: How can I find the maximum and minimum of this function, for a value of $\text{n}$?

$$\text{G}_\text{sc}\left(\text{n}\right)=\alpha\cdot\left(1+\epsilon\cos\left(\theta\right)\right)^2\tag1$$
Where $\alpha\space\wedge\space\epsilon\in\mathbb{R}^+$
And, for $\theta$ we know that:
$$\frac{\text{n}}{\text{A}}\int_0^{2\pi}\frac{1}{\left(1+\epsilon\cos\left(x\right)\right)^2}\space\text{d}x=\int_0^\theta\frac{1}{\left(1+\epsilon\cos\left(x\right)\right)^2}\space\text{d}x\space\Longleftrightarrow\space\theta\left(\text{n}\right)=\dots\tag2$$
Where $\text{A}\in\mathbb{R}$ and $0<\text{n}\le\text{A}$ and $\color{red}{\text{when you solve}}$ $\color{red}{\theta}$ $\color{red}{\text{we will get that}}$ $\color{red}{\theta}$ $\color{red}{\text{a function is of}}$ $\color{red}{\text{n}}$

My work:
In order to find the minumum and maximum:
$$\text{G}'_\text{sc}\left(\text{n}\right)=\frac{\text{d}}{\text{d}\text{n}}\left(\text{G}_\text{sc}\left(\text{n}\right)\right)=0\tag3$$
But I do not understand how to proceed.

Let $$I(\theta) = \int_0^\theta \frac1{(1+\epsilon\cos x)^2}\,dx,$$ then$$\frac{dn}{d\theta} = \frac{A}{I(2\pi)(1+\epsilon\cos\theta)^2}.$$ The first order condition of $G' = 0$ becomes $$0 = \frac{dG}{dn} = \frac{dG}{d\theta}\frac{d\theta}{dn} = -2\alpha\epsilon \frac{I(2\pi)}{A}\sin\theta(1+\epsilon\cos\theta)^3.$$  The zeros occurs at $\sin\theta = 0$ or $(1+\epsilon\cos\theta) = 0$. 
