2nd order ODE boundary value constant input-- stuck

1. Aug 16, 2016

fahraynk

1. The problem statement, all variables and given/known data
Uxx - SU = A ; 0<x<1
Boundary conditions :
Ux(0) = 0
U(1) = 0
3. The attempt at a solution
I tried to set a new variable W = u + A, I can get rid of the A in the main equation and U(1) becomes = 1.
If I set U= C*esqrt(S)x into the equation, its a trivial solution because of the boundary conditions C=0
If I plug U= -C*cos(sqrt(s)x) in, x=nπ if sqrt(s)=1,2,3.. but x <1, so I dont think this is viable...

How do I go about solving this analytically? Can someone point me in the right direction? Do I need to use Laplace transform or something?
Books answer = (A/S) * (cosh(x√s)-1)/cosh(√s)

2. Aug 16, 2016

Ray Vickson

The DE reads as $D_x^2 U -S(U + A/S)=0$, so $v = U +A/S$ satisfies the homogeneous equation $D_x^2 v = Sv$. What do the boundary conditions on $U$ become for $v$? How can you determine the constants $a,b$ so that
$$v = a \cosh(x \sqrt{S}) + b \sinh(x \sqrt{S})$$
satisfies the boundary conditions?

3. Aug 16, 2016

Twigg

Your first approach (using Ray's notation), with $v = ce^{\sqrt{s}x}$ was two or so steps away from being equivalent to Ray's. From the characteristic equation $k^{2} - s = 0$ you have two solutions, $k = +\sqrt{s}$ and $k = -\sqrt{s}$. That means your general solution is a linear combination of both, $v = c_{1} e^{\sqrt{s}x} + c_{2} e^{-\sqrt{s}x}$. Notice what happens when you plug that solution into the boundary condition $v'(0) = 0$, and keep in mind that $cosh(x) = \frac{1}{2} (e^{x} + e^{-x})$. It doesn't matter if you use the combination of exponentials I suggested or the combinations of cosh and sinh that Ray suggested. They give the same result, once you convert between the two with the identity I mentioned.

4. Aug 19, 2016

fahraynk

Thanks, got it.