Analytic solution to differential equations with reflected arguments

I am curious about whether or not there are any techniques to find solutions to functional differential equations where the arguments of $y,y',...$ are only either of $\pm x$ (which could be considered a special case of $kx$). For instance, consider the (linear) differential equation:

$$y(x)+y'(-x)= f(x)$$

I was able to find, essentially by guessing, that the homogeneous solution is:

$$y=A(\sin(x)-\cos(x))$$

and we have some particular integrals such as:

$$f(x)=c \implies y(x) = c$$ $$f(x) = x \implies y(x) = x-1$$ $$f(x)=e^{\pm x} \implies y(x) = \frac{e^x \mp e^{-x}}{2}$$ $$f(x)=\frac{e^{-x} \pm e^{x}}{2} \implies y(x) = \frac{e^{\pm x}}{2}$$

If we let $y(x) = \sin(ax+b)$, varying $a,b$ affects the amplitude of the output, but, curiously, not the phase. Thus, I couldn't figure out $f(x) = \sin(x)$.

Other than computing power series solutions, are there any ways that this problem could be approached, especially for higher-order analogues?


Solution 1:

Set $$ p(x)=\frac{1}{2}\big(y(x)+y(-x)\big) \qquad\text{Even part.} $$ $$ m(x)=\frac{1}{2}\big(y(x)-y(-x)\big) \qquad\text{Odd part.} $$ Then $$ y(x)=p(x)+m(x), \\ y'(x)=p'(x)+m'(x), \\ y'(-x)=p'(-x)+m'(-x)=-p'(x)+m'(x) $$ Hence $$ y(x)+y'(-x)=\big(p(x)+m'(x)\big)+\big(m(x)-p'(x)\big) $$ Where $p(x)+m'(x)$ even and $m(x)-p'(x)$ odd. So if $f=g+h$ (even, odd parts resp.) then we have the system $$ p(x)+m'(x)=g(x), \\ m(x)-p'(x)=h(x), \\ $$ with $m(0)=0$, and $p(0)=p_0$. Or $$ p'=m-h, \\ m'=-p+g. $$

Solution. $$ \binom{p}{m}'= \left(\begin{array}{cc} 0 & 1 \\ -1& 0 \end{array}\right) \binom{p}{m} +\binom{-h}{g}, \qquad \binom{p(0)}{m(0)}=\binom{p_0}{0} $$ and hence $$ \binom{p(x)}{m(x)}=\left(\begin{array}{cc} \cos x & \sin x \\ -\sin x& \cos x \end{array}\right)\binom{p_0}{0}+\int_0^x \left(\begin{array}{cc} \cos (x-t) & \sin (x-t) \\ -\sin (x-t)& \cos (x-t) \end{array}\right)\binom{g(t)}{h(t)}\,dt. $$ Thus $$ p(x)=p_0\cos x+ \int_0^x\big(\cos(x-t)g(t)+\sin(x-t)h(t)\big)\,dt \\ m(x)=-p_0\sin x + \int_0^x \big(-\sin(x-t)g(t)+\cos(x-t)h(t)\big)\,dt $$ Finally, $$ y(x)=p(x)+m(x)=\cdots=p_0(\cos x-\sin x)+\int_0^x\big( f(x)\cos(x-t)-f(-x)\sin(x-t)\big)dt $$