How do i optimize a function with an integral in it? I want to find the values of 
$t_1 t_2...t_n$ which would give the maximum value for the function below:
$\int_a^b \{f_1(x-t_1)+f_1(x-t_2)+f_1(x-t_n)\} dx$
functions $f_1f_2....f_n$ are expected to be polynomials.
$t_1 t_2...t_n$ are real numbers.
Ive only studied math upto 1st year university level and a bit rusty on some concepts.
If someone could give me some general guidance on how to approach this and or point me to a resource which talks about how to optimize a function like this it would be much appreciated.
 A: To optimize, you find the derivative of the function with respect to $t_1,t_2,...,t_n$, and set them to zero:
$$\int_a^b f_1'(x-t_1) dx=0\\
\int_a^b f_2'(x-t_2) dx=0\\
...\\
\int_a^b f_n'(x-t_n) dx=0\\
$$
It then depends on your functions $f_1,..., f_n$ to solve them.
A: The maximum will be attained at $(t_1,\dots,t_n)$ if $t_i$ maximizes $\int_a^bf_i(x-t_i)\,dx$.
Given a polynomial $f$ of degree $d$, define $F(t)=\int_a^bf(x-t)\,dx$. It is also a polynomial of degree $d$. If $d$ is odd, it is unbounded, both above and below. If $d$ is even and the leading term has a positive coefficient, it is unbounded above. The only possibility for $F$ to attain a maximum in $\mathbb{R}$ is that $f(x)=c\,x^{2m}+\dots$ with $c<0$. I will assume that this is the case, that is, $d=\,m$. We want to maximize $F$. The derivative of $F$ is
$$
F'(t)=-\int_a^bf'(x-t)\,dx=f(a-t)-f(b-t).
$$
It is a polynomial of degree $d-1$. So the procedure will be


*

*Solve the equation $f(a-t)-f(b-t)$. It will have at least a real solution.

*One of the solutions will be the point at which $F$ attains its maximum.


To solve the original problem, you will have to catrry this procedur for each $f_i$.
