de-CH
utf-8
math math-format
Inhomogeneous Solution
dgl-03-02
multiple
1800
randRange(-10,-1) randRangeExclude(2,10) randRangeNonZero(-10,10) A+B

Consider the ODE y'(x) = -\dfrac{y(x)}{x - A} -By(x) + \dfrac{e^{-Bx}}{x -A} with y(0) = D and x >A.

Determine the solution \color{orange} y(x) of the IVP.

x \color{orange} y(x) = \frac{x + -A*D}{e^{Bx}(x -A)}

We first determine the general solution of the corresponding homogeneous ODE y'(x) = p(x)\cdot y(x).

Here, after factoring, p(x) = -\dfrac{1}{x - A} -B.

Use this to find y(x) = K \cdot e^{P(x)} with constant K and an antiderivative \displaystyle P(x) \in \int p(x) dx of p.

Since x >A, we have that \displaystyle P(x) \in \int p(x) dx = \int \left(-\dfrac{1}{x - A} -B \right)dx= -\ln |x -A| - Bx =- \ln (x -A) - Bx +.

Substituting this yields y(x) = K \cdot e^{P(x)} = K \cdot e^{- \ln (x -A) - Bx} = K \cdot \dfrac{1}{x -A} \cdot e^{ - Bx}.

The integration constant K is determined along with the remaining constants by the initial condition y(0) = D in the end.

Using the variation of parameters approach, the general solution of the inhomogeneous ODE \displaystyle y(x) = \left( \int e^{-P(x)} \cdot q(x) dx + C \right) e^{P(x)} is.

Compute e^{-P(x)} \cdot q(x) = e^{-(- \ln (x -A) - Bx )} \cdot \dfrac{e^{-Bx}}{x -A} = (x -A) e^{Bx}\cdot \dfrac{e^{-Bx}}{x -A} = 1

and \displaystyle \int e^{-P(x)} \cdot q(x) dx = \int 1 dx = x +C .

The inhomogeneous solution is therefore \displaystyle y(x) = \left( x +C \right) e^{P(x)} = \left( x +C \right) \cdot \dfrac{1}{x -A} \cdot e^{ - Bx} = \frac{ x +C }{e^{Bx}(x -A)}.

Using y(0) = D = \dfrac{0 +C }{1 \cdot (0 -A)} yields C = -A*D.

In conclusion, the solution of the IVP reads \displaystyle {\color{orange}y(x) = \frac{x + -A*D}{e^{Bx}(x -A)}}.