Is it possible to find a general anti-derivative of this equation? I have an equation of which I need to find the mean value over time, which is
$$\sqrt{a^{2}+2aA\cos(t)+4A^{2}\cos(t)^{2}}$$
In this case, a is 1.42, and A is an unknown constant, and so I wish to express the mean value in terms of A. What I do know is that $A<<a$, and so the term under the square root will always be positive. To find the mean I thought I would solve the following:
$$\frac{1}{T}\int_{T/2}^{-T/2}\sqrt{a^{2}+2aA\cos(t)+4A^{2}\cos(t)^{2}}\,dt$$
But I don't think it is possible to solve this integral analytically, or am I mistaken? If so, how can I approach this problem?
Thanks for your time,
Suzanne
 A: This is pure nightmare. CAS are able to find the antiderivative; it involves nasty elliptic integrals of different kinds.
For the antiderivative, what I should do is to let $A=\lambda a$ which makes the integrand to be
$$\sqrt {a^2} \sqrt{1+2 \lambda  \cos (t)+4 \lambda ^2 \cos ^2(t)}$$ and expand it as a Taylor series around $\lambda=0$. This would give for the second radical
$$1+\lambda  \cos (t)+\frac{3}{2} \lambda ^2 \cos ^2(t)-\frac{3}{2} \lambda ^3 \cos
   ^3(t)+\frac{3}{8} \lambda ^4 \cos ^4(t)+\frac{15}{8} \lambda ^5 \cos
   ^5(t)+O\left(\lambda ^6\right)$$ which would be easy to integrate termwise to get for
$$I=\int_{+\frac T2}^{-\frac T2} \sqrt{1+2 \lambda  \cos (t)+4 \lambda ^2 \cos ^2(t)}\,dt$$ after simplifications, something like
$$I=-T-2 \lambda  \sin \left(\frac{T}{2}\right)-\frac{3}{4} \lambda ^2 (T+\sin
   (T))+\frac{1}{4} \lambda ^3 \left(9 \sin \left(\frac{T}{2}\right)+\sin
   \left(\frac{3 T}{2}\right)\right)-\frac{3}{128} \lambda ^4 (6 T+8 \sin (T)+\sin
   (2 T))-\frac{1}{64} \lambda ^5 \left(150 \sin \left(\frac{T}{2}\right)+25 \sin
   \left(\frac{3 T}{2}\right)+3 \sin \left(\frac{5
   T}{2}\right)\right)+O\left(\lambda ^6\right)$$
Trying with $T=\frac \pi 4$ and $\lambda=\frac 1 {10}$, this would give $\approx -0.872076$ while the numerical integration gives $\approx -0.872074$
Edit
Reworking the problem, we can write
$$ \sqrt{1+2 \lambda  \cos (t)+4 \lambda ^2 \cos ^2(t)}=\sum_{n=0}^\infty 2^n a_n \lambda^n  \cos (t)^n$$ where
$$a_n=C_n^{\left(-\frac{1}{2}\right)}\left(-\frac{1}{2}\right) $$ are particular Gegenbauer polynomials. Back to their definition, these coefficients $a_n$ are then given by
$$a_n=-\frac{\left(n-\frac{3}{2}\right) a_{n-1}+(n-3) a_{n-2}}{n}\qquad \text{with}\qquad a_0=1\qquad \text{and}\qquad a_1=\frac 12$$ The first $a_n$ are
$$\left\{1,\frac{1}{2},\frac{3}{8},-\frac{3}{16},\frac{3}{128},\frac{15}{256},-\frac{
   57}{1024},\frac{21}{2048},\frac{867}{32768},-\frac{1893}{65536},\frac{1581}{2621
   44},\frac{8283}{524288},-\frac{76953}{4194304}\right\}$$ making
$$\color{blue}{\int \sqrt{1+2 \lambda  \cos (t)+4 \lambda ^2 \cos ^2(t)}\,dt=\sum_{n=0}^\infty 2^n a_n \lambda^n \int \cos (t)^n\,dt}$$ and remembering the reduction formula
$$\int \cos (t)^n\,dt=\frac 1n \cos(t)^{n-1} \sin(t)+\frac {n-1}n \int \cos (t)^{n-2}\,dt $$ all of the above would make the calculations quite simple (in particular from a coding point of view).
