de-CH
utf-8
math math-format
General Solution
dgl-01-02
multiple
100
randRange(2,12) randRange(2,12)

Consider the ODE y'(t) = A\cdot y(t) +B.

Determine {\color{red}a} and {\color{blue}b}, such that for all real numbers C the function y with y(t) = C \cdot e^{{\color{red}a} \cdot t} + {\color{blue}b} is a solution of the ODE.

a \color{red}a = A
c \color{blue}b = -B/A

Substitute the function y(t) = C \cdot e^{{\color{red}a} \cdot t} + {\color{blue}b} into the ODE y'(t) = A\cdot y(t) +B.

The derivative reads y'(t) = \left (C \cdot e^{{\color{red}a} \cdot t} + {\color{blue}b}\right)' = {\color{red}a} \cdot C \cdot e^{{\color{red}a} \cdot t}.

Thus it follows {\color{red}a} \cdot C \cdot e^{{\color{red}a} \cdot t} = A\cdot \left(C \cdot e^{{\color{red}a} \cdot t} + {\color{blue}b} \right) +B = A \cdot C \cdot e^{{\color{red}a} \cdot t} +\left( A {\color{blue}b}+ B \right) .

As this should hold for all C, it must hold in particular if C = 0.

We thus solve A {\color{blue}b}+ B=0 for {\color{blue}b}.

This gives {\color{blue}b} = fractionReduce(-B,A).

Substitute {\color{blue}b} into {\color{red}a} \cdot C \cdot e^{{\color{red}a} \cdot t} = A \cdot C \cdot e^{{\color{red}a} \cdot t} +\left( A {\color{blue}b}+ B \right) with t = 0.

This results in {\color{red}a} \cdot C \cdot 1 = A \cdot C \cdot 1+\left( A {\color{blue}b}+ B \right) = A \cdot C +0 and finally {\color{red}a} = A .