Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to solve the equation $$\frac{d^2y}{dx^2}-y(x)=f(x)$$ on $0\le x\le a$ s.t. $y(0)=y(a)=0.$

Note that $f(x)$ is given by

$$ f(x) = \left\{ \begin{array}{lr} 1 & : 0 \le x \le b\\ -1 & : b<x\le a \end{array} \right. $$

where $0\le b \le a$.

In particular, I'm hoping to show that in the subregion $0 \le x \le b$,

$$y(x)=\frac{2}{\sinh (a)}[\sinh(a-x)-\sinh(x)-\cosh(x)\sinh(a-x)-\sinh(x)\cosh(a-x)+2\sinh(x)\cosh(a-b)].$$

So, I tried to proceed by finding the Green's function of $D=d^2/dx^2-1$ but I was unable to get the answer to appear as given. Can anyone help me out?

share|cite|improve this question
The solution I listed is for the subregion $0 \le b \le a$! – Alex Jan 10 '13 at 1:50
up vote 2 down vote accepted

The Green's function can be found by a standard exercise. Here is an answer to another problem where the steps are worked out in detail. The Green's function for this problem is $$G(x,y) = \frac{1}{\sinh a} \begin{cases} \sinh x\sinh(y-a), & x<y \\ \sinh y\sinh(x-a), & x>y. \end{cases}$$

The first calculation below is based on the original problem.

I. For $$f(x) = \begin{cases} 1, & 0\le x\le b \\ 0, & b< x\le a \end{cases}$$ we have $$\begin{eqnarray*} y(x) &=& \int_0^a dy\, G(x,y)f(y) \\ &=& \int_0^b dy\, G(x,y) \\ &=& \int_0^x dy\, G(x,y) + \int_x^b dy\, G(x,y) \\ &=& \frac{1}{\sinh a} \left( \int_0^x dy\, \sinh y\sinh(x-a) + \int_x^b dy\, \sinh x\sinh(y-a) \right) \\ &=& \frac{\cosh(a-b)-\cosh a}{\sinh a}\sinh x + \cosh x -1 \qquad (0<x<b). \end{eqnarray*}$$ The solution for $b<x$ can be found similarly.

II. For $$f(x) = \begin{cases} 1, & 0\le x\le b \\ -1, & b< x\le a \end{cases}$$ in the revised question we simply subtract the integral $$\frac{1}{\sinh a} \int_b^a dy\, \sinh x\sinh(y-a)$$ from the result in I. We find $$y(x) = \frac{2\cosh(a-b)-\cosh a -1}{\sinh a}\sinh x + \cosh x - 1 \qquad (0<x<b).$$ This is the solution quoted in the question statement without the overall factor of 2.

share|cite|improve this answer
oen: I made a mistake when writing the question that I just realized. $f(x)$ is now corrected in the original post. I was able to get the Green's function you have, but applying it in the integral with the correct interval and everything was giving me fits. Could you walk me through this with the corrected $f(x)$ if you don't mind? – Alex Jan 10 '13 at 4:41
@Alex: I'll try and write something about it in a bit. – user26872 Jan 10 '13 at 4:44
oen: Thanks, I appreciate it! – Alex Jan 10 '13 at 5:24
@Alex: Glad to help. – user26872 Jan 10 '13 at 6:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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