I have got stuck in two Strum-Liouville problems.
$1. \quad y''+y=-1,\quad y(0)=0,\quad y(\pi)+y(\dfrac{\pi}{2})=0$, Now
$y''+y=0$ and $y(0)=0 \implies \phi_1(x)=\sin x$ while
$y''+y=0$ and $y(\pi)+y(\dfrac{\pi}{2})=0\implies \phi_2(x)=\cos x +\sin x$
So the Green's Function that I am getting is :
$G(x,\xi)=\begin{cases}\sin x(\cos \xi+\sin \xi),\quad x\lt\xi\\\sin \xi (\cos x+\sin x),\quad x\gt\xi\end{cases}$
and the solution I am getting :
$y(x)=\cos x+2\sin x-1$ but the answer given is $y(x)=\cos x+3\sin x-1$. Can somebody show what is wrong and give the correct solution.
$2. \quad y''+y=0,\quad y(0)=y(1),\quad y'(0)=y'(1)$. Find the Green's Function for this problem.
The two linearly independent solutions of the associated homogeneous equation that I got after putting boundary conditions are
$\phi_1(x)=\sin(1-x)+\sin x$ and $\phi_2(x)=\cos(1-x)+\cos x$. But then I am getting the Wronskian $W(\phi_1,\phi_2)=\phi_1\phi_2'-\phi_1'\phi_2$ as $0$. But I know that the Green's function exist. Can someone help me. Thanks in advance.