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.

  • $\begingroup$ I don't see Green's function in your solution. Your computation of $x(t)$ involves the right hand side of the equation, which is something Green's function does not depend on. It depends only on the differential operator and the boundary condition. And that boundary conditions must be homogeneous for Green's function to work. Your computation looks like the variation of parameters, actually. $\endgroup$ – user127096 Apr 13 '14 at 1:32

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$$

  • $\begingroup$ I was just wondering what if we want to solve the boundary value problem (using Green's function) in the case where the values at the boundary are not $0$. For example, $y(a)=A$ and $y(b)=B$. Is there a more general way than just modifying our general solution so that it satisfies the boundary condition, like in this question you changed $y_{2}=cos(t)$ to $y_{2}=cos(t-1)$? $\endgroup$ – IgNite Apr 21 '16 at 8:31
  • $\begingroup$ I ask this because my textbook never says anything about this special case, and all the problems come with the boundary condition like $y(a)=0=y(b)$. So I'm wondering what if the boundary condition is $y(a)=A$ and $y(b)=B$ or something else. Could you tell me where can I study more on this? $\endgroup$ – IgNite Apr 21 '16 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.