Consider the ODE
y'(x) = p(x) \cdot y(x) + {\color{purple}q(x)}
with p(x) = 2x - A+B
,
\color{purple}q(x) = e^{x^2 - A+Bx +A*B}
and y(0) = 0
.
Determine the value \color{orange} y(C)
of the solution of the IVP.
\color{orange} y(C)
=
C
First, we determine the general solution of the associated homogeneous ODE y'(x) = p(x) \cdot y(x)
.
It is given by y(x) = K \cdot e^{P(x)}
.
Here, K
is a constant and \displaystyle P(x) \in \int p(x) dx
is an antiderivative of p
.
For the case at hand, we have \displaystyle P(x) \in \int p(x) dx =
\int \left( 2x - A+B
\right) dx =
x^2 -A+Bx+K
.
The integration constant
K
is determined by the initial condition y(0) = 0
.
With the method of variation of constants, the general solution of the inhomogeneous ODE is
\displaystyle y(x) = \left( \int e^{-P(x)} \cdot q(x) dx + C
\right) e^{P(x)}
.
We calculate e^{-P(x)} \cdot q(x) = e^{-x^2 +A+Bx} e^{x^2 - A+Bx +A*B}
= e^{A*B}
and \displaystyle \int e^{-P(x)} \cdot q(x) dx = \int e^{A*B} dx = x e^{A*B} + C
.
In the general solution \displaystyle y(x) = \left( x e^{A*B} + C
\right) e^{P(x)}
,
we find the constant C
by
y(0) = 0 = \left( 0 \cdot e^{A*B} + C
\right) e^{P(0)} = C
.
Thus, the solution of the IVP is \displaystyle y(x) = x e^{A*B} e^{P(x)} =
e^{A*B} x e^{x^2 -A+Bx}
.
Substitution gives {\color{orange} y(C)} =
e^{A*B} \cdot C \cdot e^{C^2 -A+B \cdot C} =
e^{A*B} \cdot C \cdot e^{-A*B} = C
.