I am trying to prove a differentiable solution in some open interval about the origin for the equation:
$$u(x) + u(x)^2 + \int_0^x (1+\cos(x+u(y))) dy = 0$$
I have been trying to prove it as a contraction on some specifically suited Banach space of continuous functions, but it's not working out like I need it to. I'm uncomfortable with the $u(x)^2$ term, but am currently treating this like a linear Volterra integral equation.
My question is if there is a better approach to nonlinear terms of the function, e..g $u(x)^2$?
Define Space and Map: Let us reformulate the problem as $$ u(x) = -u(x)^2 - \int_0^x 1+\cos(x+u(y)) dy $$ We will now define a space $X$ and operator $T$ on $X$ as \begin{aligned} X & = \Big\{u\in C[-\tfrac{1}{9},\tfrac{1}{9}] \: \|u\| \leq \tfrac{1}{3}, u(0) = 0 \Big\}\\ [Tu](x) & = -u(x)^2 - \int_0^x 1+\cos(x+u(y)) dy. \end{aligned}
Observe that $[-\tfrac{1}{9},\tfrac{1}{9}]$ is compact and thus $C[-\tfrac{1}{9},\tfrac{1}{9}]$ is complete. If $u\in X$, then \begin{aligned} \|Tu\| & = \Big\| -u(x)^2 - \int_0^x 1+\cos(x+u(y)) dy\Big\| \\ & \leq \|u\|^2 + \sup_{x\in[0,\tfrac{1}{9}]} \int_0^x|1+\cos(x+u(y))|dy \\ & \leq \frac{1}{9} + \sup_{x\in[0,\tfrac{1}{9}]} \int_0^\frac{1}{9} |1+\cos(x+u(y))| dy \\ & = \frac{1}{3} \end{aligned} By the fundamental theorem of calculus $Tu$ is continuous on $[-\tfrac{1}{9},\tfrac{1}{9}]$, and notice that $[Tu](0) = 0$. Thus $Tu\in X$.
Prove Contraction: Let $u,v\in X$. Then observe \begin{aligned} \|Tu - Tv\| & = \sup_{x\in[0,\tfrac{1}{9}]} \Big| -u(x)^2 - \int_0^x 1+\cos(x+u(y))dy + v(x)^2 + \int_0^x 1+\cos(x+v(y))dy \Big| \\ & = \sup_{x\in[0,\tfrac{1}{9}]} \Big| v(x)^2-u(x)^2 + \int_0^x \cos(x+v(y)) - \cos(x+u(y)) dy \Big|\\ & = \sup_{x\in[0,\tfrac{1}{9}]} \Big| (v(x)-u(x))(v(x)+u(x)) + \int_0^x \cos(x+v(y)) - \cos(x+u(y)) dy \Big| \\ & \leq \|v-u\|\|v+u\| + \sup_{x\in[0,\tfrac{1}{9}]} \int_0^x | \cos(x+v(y)) - \cos(x+u(y)) | dy \\ & \leq \|v-u\|\|v+u\| + \tfrac{1}{9}\| \cos(x+v(y)) - \cos(x+u(y)) \|. \end{aligned} Since $|\tfrac{d}{dx}\cos(x)| \leq 1$, by the mean value theorem for any points $x,y$, $|f(x) - f(y)| \leq |x-y|$. By uniform continuity, if $|x + v(y) - (x + u(y))| = |v(y) - u(y)| < \epsilon$, then $|\cos(x+v(y)) - \cos(x + u(y))| < \epsilon$. It follows that \begin{aligned} \|Tu - Tv\| &\leq \|v-u\|\|v+u\| + \tfrac{1}{9}\| \cos(x+v(y)) - \cos(x+u(y)) \| \\ & \leq \|v-u\|\|v+u\| + \tfrac{1}{9}\|v-u\| \\ & = \|v-u\|\Big( \tfrac{1}{9} + \|v+u\|\Big) \\ & \leq \tfrac{7}{9}\|u-v\|. \end{aligned} Thus $T:X\to X$ is a contraction on a complete metric space $X$. By the contraction mapping theorem, $\exists!$ solution $u\in X$ s.t. $Tu = u$. Given that $X\subset C[-\tfrac{1}{9},\tfrac{1}{9}]$, it follows that we have a continuous solution $u\in C[-\tfrac{1}{9},\tfrac{1}{9}]$.
Differentiable: By the fundamental theorem of calculus $\frac{d}{dx}\Big[\int_0^x 1+\cos(x+u(y)) dy\Big] = 1+\cos(x+u(y))$ on the open interval $(-\tfrac{1}{9},\tfrac{1}{9})$. Then observe \begin{aligned} \frac{d}{dx}[ u(x) ] & = \frac{d}{dx}\Big[ -u(x)^2 - \int_0^x 1+\cos(x+u(y)) dy\Big] \\ & = -2u(x)u'(x) - (1+\cos(x+u(y))) \\ u'(x) & = -\frac{1+\cos(x+u(y))}{1 + 2u(x)}. \end{aligned}
Given that $\|u\| \leq \frac{1}{3}$, it follows that $\not\exists x\in[-\tfrac{1}{9},\tfrac{1}{9}]$ s.t. $1+2u(x) = 0$. Thus $u'(x)$ is well-defined on the open interval $(-\tfrac{1}{9},\tfrac{1}{9})$.