# How to solve this system of equations that appears in a ODE exercise?

I am trying to solve this equation, we know $A, B, Q,\phi\in\mathbb{R}$.

\begin{eqnarray} T''(x) &=& \phi (T(x)-Q) \\ T(0)&=& A\\ T(b)&=&B \end{eqnarray}

So the solution will be the sum of a particular solution and a general solution.

By solving $$r^2-\phi=0$$ we have $r=\sqrt{\phi}:=p$

So the general solution has the form:

$$T(x)= K_1 e^{xp}+K_2 e^{-xp}$$

If we try a constant, $T_p$, as a particular solution we have

$$0=\phi(T-Q)$$ so

$$T_p=Q$$

Then the solution is

$$T(x) = Q+K_1 e^{xp}+K_2 e^{-xp}$$

Now we apply the condition, so this is the system than I need to solve: \begin{eqnarray} T(x) &=& Q+K_1 e^{xp}+K_2 e^{-xp} \\ T(0)&=& A\\ T(b)&=&B \end{eqnarray}

Where we know $A,B,Q$ and $p$.

so what we need to do is to replace $A$ and $B$

so we have \begin{eqnarray} A &=& Q+K_1 +K_2 \\ B &=& Q+K_1 e^{bp}+K_2 e^{-bp} \end{eqnarray}

And solve this system to find $K_1$ and $K_2$.

If we use $\cosh(xp)$ and $\sinh(xp)$ notation, I mean

$$T(x) =Q+K_1 e^{xp}+K_2 e^{-xp}$$ generates the same space as

$$T(x) =Q+C_1 \cosh(xp) + C_2\sinh(xp)$$

so now we can have a little advantage, because:

\begin{eqnarray} A &=& Q+C_1 \\ B &=& Q+C_1 \cosh(bp)+C_2 \sinh(bp) \end{eqnarray}

So we have $C_1=A-Q$ and then

$$B-Q=(A-Q)\cosh(bp)-C_2 \sinh(bp)$$

And here is I don´t know how to continue,

1) Is this allowed?

$$C_2=\frac{Q-B+(A-Q)\cosh(bp)}{\sinh(bp)}$$

I mean, are we dividing by zero? $$\sinh(x)=0\leftrightarrow e^x=e^{-x}\leftrightarrow x=i\pi n$$

I think in my problem complex numbers are not allowed, so is this correct?

2) if step 1) is correct then we have

$$C_2=\frac{Q-B+(A-Q)\cosh(bp)}{\sinh{bp}}$$

so the solution for $T(x)$ is

$$T(x)=Q+(A-Q)\cosh(xp)+\frac{Q-B+(A-Q)\cosh(bp)}{\sinh(bp)}\sinh(xp)$$ Is there some way to simplify $T(x)$, to some form more cleanly.

3) Now if we change the conditions to these:

\begin{eqnarray} T'(0)&=& A \\ T'(b) &=& B \end{eqnarray}

How do need to continue? This way(?): as $$T(x) =Q+C_1 \cosh(xp) + C_2\sinh(xp)$$ then $$T'(x)= Q +C_1 p\sinh(xp) + C_2 p \cosh(xp)$$

and solve this system(?): \begin{eqnarray} T'(0)&= & A= Q + C_2 p \\ T'(b) &=& B= Q +C_1 p\sinh(bp) + C_2 p \cosh(bp) \end{eqnarray}

Help with 1), 2) and 3) please!

Thank you! Sorry for my English!

-
$i \pi n=0$ if $n=0$, so $\sinh(0)=0$ but we can consider $p>0$, $b>0$. So $\sinh(bp)\neq 0$? – Maths Student May 27 '14 at 9:23

Solving the equations almost the same way as you did, I have been able to simplify the expression as $$t(x)=Q+\text{csch}(k p) \Big((A-Q) \sinh [p (k-x)]+(B-Q) \sinh [p x] \Big)$$ I hope and wish this helps.
I totally agree ! My contribution was $\epsilon$ or even less ! – Claude Leibovici May 27 '14 at 13:11
There is no difficulty if the cases $\phi>0$, then $\phi=0$, then $\phi<0$ are considered successively.