Assuming $u<0$, $\int_0^a v dx =0$, $|v|\le\varepsilon$, we can say that $\int_0^a u(x) v(x) \, dx \le 0$? Let $a>0$ be fixed. Let $u, v$ two continuous, non-constant real valued functions such that:

*

*$u<0$;

*$\displaystyle\int_0^T v dx =0$;

*there exists $\varepsilon>0$ small such that $|v|\le\varepsilon$.

I am trying to understand if those three conditions imply necessarily that
$$\int_0^a u(x) v(x) \, dx \le 0.$$
The only thing I have deduced so far is that as 2. holds and $v$ is continuous, thus necessarily $v$ changes its sign in $[0, a]$. Also, if 1. holds, then it is $\displaystyle\int_0^a u(x) dx <0$.
Nonetheless, I do not know how to proceed with the proof.
Could someone please help me in proving that? If it is false, could you please tell under what additional assumptions that integral il negative?
Thank you in advance.
 A: First a simple counter-example, then a proof that for every such $v$ we can find a counter-example $u$.
$\rhd$ I don't think this is true. Let's take $u : x \mapsto -x^2-1$, $v: x \mapsto b\times \left(\dfrac{T}{2}-x\right)$ with $b$ small enough such that $|v| < \varepsilon$. We have

*

*$u < 0$ on $[0,T]$ ;

*$|v| < \varepsilon$ ;

*$\displaystyle\int_0^T v(x) dx = T\times \dfrac{T}{2}-\dfrac{T^2}{2}=0$.

But
$$\begin{array}{lll}
\displaystyle\int_0^T u(x)v(x) dx &=&\displaystyle \int_0^T x^3 - \dfrac{T}{2}x^2 dx \\
&=& \left[\dfrac{x^4}{4} - \dfrac{T}{6}x^3\right]_0^T \\
&=&\dfrac{T^4}{4}-\dfrac{T^4}{6}\\
&=&\dfrac{T^4}{12} >0.
\end{array}$$
Thre main problem is that $u$ can be bigger (in absolute value) when $v$ is negative than when $v$ is positive. Hence the positive contribution for $uv$ to the integral (i.e. when $v<0$) is bigger than its negative contribution (i.e. when $v>0$). Let's follow this idea to build a general counter-example.
$\rhd$ For a given $v$ satisfying the hypothesis, if $v$ is not everywhere equal to $0$, we can find $x_1$ and $x_2$ such that $v(x_1)>0$ and $v(x_2)<0$. As $v$ is continuous, we can find some neighborhhood $[a,b]$ of $x_2$ such that $v <0$ on $[a,b]$.
Let's take $\eta >0$ a constant to be defined later. Define $u$ as the continous function defined :

*

*$u$ is $-\eta$ on $[0,a]$ ;

*$u$ is the affine fonction going from $0$ to $-1$ on $[a,\frac{a+b}{2}]$

*$u$ is the affine fonction going from $-1$ to $0$ on $[\frac{a+b}{2},b]$

*$u$ is $-\eta$ on $[b,T]$.

Mainly, $u$ has a "big" negative peak on the interval $[a,b]$ and is very close to $0$ everywhere else. Then
$$\begin{array}{lll}
\displaystyle\int_0^T uv &=& \displaystyle\int_0^a uv +\displaystyle\int_a^b uv +\displaystyle\int_b^T uv \\
\end{array}$$
Note that $\displaystyle\int_a^b uv$ is a positive number (as $u$ and $v$ are strictly negative on $[a,b]$). Let's choose $\eta$ smmall enough such that
$$\eta \left(\displaystyle\int_0^a |v| + \displaystyle\int_b^T |v|\right) < \displaystyle\int_a^b uv.$$
Then we have
$$\begin{array}{lll}
\left|\displaystyle\int_0^a uv +\displaystyle\int_b^T uv \right| &\leq &\displaystyle\int_0^a |uv| +\displaystyle\int_b^T |uv| \\
&\leq &\displaystyle\int_0^a \eta|v| +\displaystyle\int_b^T \eta |v| \\
&\leq &\eta \left(\displaystyle\int_0^a |v| + \displaystyle\int_b^T |v|\right) \\
& < & \displaystyle\int_a^b uv.
\end{array}$$
Therefore $\displaystyle\int_a^b uv > -\left(\displaystyle\int_0^a uv +\displaystyle\int_b^T uv\right)$
$$\displaystyle\int_0^T uv = \displaystyle\int_0^a uv +\displaystyle\int_a^b uv +\displaystyle\int_b^T uv >0.$$
