# Solving two-point BVP

1. Jan 8, 2016

### Brian T

1. The problem statement, all variables and given/known data
Determine the Green's function for the following problem
$$-u'' + cu = f$$ in the domain D = (0,1) with BC's $u(0)=u(1)=0$

2. Relevant equations
The Green's function is given by
$$G(x,y) =\begin{cases} \frac{1}{W} u_0(x)u_1(y), &\text{for } 0 \leq y \leq x \leq 1, \\ \frac{1}{W} u_0(x)u_1(y), &\text{for } 0 \leq x \leq y \leq 1. \end{cases}$$
Where W is the Wronskian of the solutions to the homogeneous equation $u_0, u_1$, where $u_0, u_1$ satisfy the boundary conditions $u_0(0)=1, u_0(1)=0, u_1(0)=0, u_1(1)=1$
3. The attempt at a solution
I am able to find the Green's function assuming $c = const$.
To find the fundamental solutions, we solve the homogenous equation $-u'' + cu = 0$.
The fundamental solutions are $e^{\sqrt{c}x}, e^{-\sqrt{c}x}$. To satisfy the boundary conditions, choose the appropriate linear combination of these fundamental solutions. After a little algebra, I get:
$$u_0(x) = \frac{1}{1 - e^{2\sqrt{c}}}e^{\sqrt{c}x} + \frac{-e^{2\sqrt{c}}}{1-e^{2\sqrt{c}}))}e^{-\sqrt{c}x}$$
$$u_1(x) = \frac{1}{e^{\sqrt{c}} - e^{-\sqrt{c}}}e^{\sqrt{c}x} + \frac{1}{e^{-\sqrt{c}} - e^{\sqrt{c}}}e^{-\sqrt{c}x}$$

I know this is all correct (plugged in and verified my solutions).
The question I have is for c not a constant, i.e. c = c(x). Since the problem does not specify whether c is constant or a function, I would assume that it could be a function... The DE becomes
$$-u'' + c(x)u = f$$
This would require getting the fundamental solutions by solving
$$-u'' + c(x)u = 0$$
which I am unsure of how to do for an arbitrary function c(x). There are certain methods for certain types of functions of c(x), but does anyone have a clue on how to solve this ODE for a general c(x)? If not do you think the problem could be referring to a constant c (in the actual chapter the author usually takes the coefficient to be an arbitrary function)? By the way, the book is numerical PDE's by Larrson

2. Jan 9, 2016

### HallsofIvy

Staff Emeritus
There is no general way of solving that for any function c(x). By the way, finding Green's function for the case c constant can by simplified by using cosh(cx) and sinh(cx) rather than $e^{cx}$ and $e^{-cx}$ .

3. Jan 9, 2016

### Brian T

Ohh alright, thanks. I'll try that instead :).