maximum value of $\int^{\frac{3\pi}{2}}_{-\frac{\pi}{2}}\sin xf(x)dx$ subjected to the condition$|f(x)|\leq 5$ maximum value of $\displaystyle \int^{\frac{3\pi}{2}}_{-\frac{\pi}{2}}\sin xf(x)dx$ subjected to the condition$|f(x)|\leq 5$
could some help me with this, thanks
 A: Hint: Argue that
$$f(x)=5\cdot sgn(\sin(x))$$
gives you the maximum, where sgn is the sign-function 
A: Hint:
$\displaystyle \int^{\frac{3\pi}{2}}_{-\frac{\pi}{2}}\sin xf(x)dx\leq \int^{\frac{3\pi}{2}}_{-\frac{\pi}{2}}|\sin xf(x)|dx\leq 5\int^{\frac{3\pi}{2}}_{-\frac{\pi}{2}}|\sin x|dx$
A: If $|f(x)|\le 5$ for all $x\in \left[-\frac{\pi}{2},\frac{3\pi}{2}\right]$, we have $\sin(x) f(x)\le|\sin(x) f(x)|\le 5|\sin(x)|$ for all $x\in\left[-\frac{\pi}{2},\frac{3\pi}{2}\right]$. 
We thus have $$\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}\sin(x)f(x)\mathrm{dx}\le\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}5|\sin(x)|\mathrm{dx}$$
But we have $$\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}5|\sin(x)|\mathrm{dx}=20$$
Hence $$\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}\sin(x)f(x)\mathrm{dx}\le 20$$
Thus the upper bound for the maximum value of $\displaystyle\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}\sin(x)f(x)\mathrm{dx}$ is $20$. 
If we let $f(x):=-5$ for $x\in\left[-\frac{\pi}{2},0\right]\cap\left[\pi,\frac{3\pi}{2}\right]$ and $f(x):=5$ for $x\in (0,\pi)$, then one has $\displaystyle\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}\sin(x)f(x)\mathrm{dx}=20$. Since this is the same as the upper bound for maximum value, the maximum value of $\displaystyle\int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}}\sin(x)f(x)\mathrm{dx}$ is $20$.
