Use Green's function to find solutions for the boundary value problem Find a solution using Green's functions
$$y''+y=t;  y(0)=0, y(1)=1$$
So far I have
$$x(t)=c_1 \cos(t)+c_2 \sin(t)$$
so
$$y_1=\cos(t), y_2=\sin(t)$$
and $$W(y_1,y_2)=-1$$
When I put that in the integral for Green's function I get
$$(x)t=\int^t_0 (s\cos(t) \sin(s))\:\mathrm{d}s - \sin(t) \int^1_t (s\cos(s))\:\mathrm{d}s$$ 
so I end up getting
$$-\cos(t)\sin(t)+t\cos^2 (t)-\sin(t)\cos(1)-\sin(t)\sin(1)+\sin(t)\cos(t)+t\sin^2 (t)$$
I think I did something wrong at the beginning, but I am not sure what. I do not think I should be getting $\sin(1)$ or $\cos(1)$ in my answer.
 A: There is an issue with $y_1(t)$ and $y_2(t)$.
For the choice of $y_1(t)$ and $y_2(t)$, we need to satisfy the boundary conditions:
$$y(0)=0, y(1)=1$$
We have the complementary solution as:
$$y_c(t) = c_1 \cos t + c_2 \sin t$$
If we choose:
$$y_1(t) = \sin t \implies y_1(0) = \sin (0) = 0 ~ \checkmark$$
Now, we need for $y_2(1) = 1$, so if we choose:
$$y_2(t) = \cos t \implies y_2(1) = \cos(1) \ne 1$$
We need to choose $y_2(t)$ such that $y_2(1) = 1$, so how about:
$$y_2(t) = \cos(t - 1) \implies y_2(1) = \cos(1-1) = \cos(0) = 1 ~ \checkmark$$
Now, we have:
$$y_1(t) = \sin t, ~ y_2(t) = \cos(t-1)$$
The Wronskian is:
$$W(y_1(t),y_2(t))(s) = -\cos(1)$$
This gives us a Green's function of:
$$G(t,s) = 
\begin{cases}
\dfrac{y_1(s)y_2(t)}{W(y_1(t),y_2(t))(s)},  & a \le s \le t \le b  \\
\dfrac{y_1(t)y_2(s)}{W(y_1(t),y_2(t))(s)},  & a \le t \le s \le b  \\
\end{cases}$$
$$ = 
\begin{cases}
\dfrac{\sin(s) \cos(t-1)}{-\cos(1)},  & 0 \le s \le t  \\
\dfrac{\sin(t) \cos(s-1)}{-\cos(1)},  & t \le s \le 1  \\
\end{cases}$$
We then solve:
$$y(t) = y_c(t) + y_p(t) = y_c(t) + \int_a^t \dfrac{y_1(s)y_2(t)f(s)}{W(y_1(t),y_2(t))(s)}~ds + \int_t^b \dfrac{y_1(t)y_2(s)f(s)}{W(y_1(t),y_2(t))(s)}~ds$$
This yields:
$\displaystyle y(t) = c_1 \cos t + c_2 \sin t + \int_0^t \dfrac{\sin(s) \cos(t-1)s}{-\cos(1)}~ds + \int_t^1 \dfrac{\sin(t) \cos(s-1)s}{-\cos(1)}~ds$
After integrating, we arrive at:
$$y(t) = c_1 \cos t + c_2 \sin t + t + \sin t$$
Using the IC to solve for the constants, we arrive at:
$$c_1 = 0, c_2 = -1$$
The final solution is:
$$y(t) = t$$
