summaryrefslogtreecommitdiff
path: root/src/math/diff.org
blob: bbb8fa642d5fbc5f43f81fa25a96b82396ee44bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#+title: Method for solving first order and Bernoulli's differential equations
#+author: Thomas Albers Raviola
#+date: 2022-10-01
#+setupfile: ../../math_options.org

* Disclaimer
This site as of now just a technology demonstration and its claims
should not be taken as true (even though I myself am pretty confident
they are)

* History
I came across the method concerning this article in an old math book from Doctor
Granville (Elements of differential and integral calculus - ISBN-13:
978-968-18-1178-5). It doesn't appear to be a popular technique as when using it
for my assignments I always had to explain what I was doing. As of yet, I still
haven't found another text referencing it, which is why I decided to include it
in my website.

In the original book this procedure is shown but never really explained, it is
left as a sort of "it just works" thing. Here is my attempt to it clear.

* Theory
Throughout this article we'll consider first order differential equations with
function coefficients just as a special case of the Bernoulli's differential
equation with $n = 0$.

Consider now the following ODE:
\begin{equation*}
y' + P(x)y = Q(x)y^n
\end{equation*}

let $y$ be the product of two arbitrary functions $w$ and $z$ such that

\begin{align*}
y &= wz \\
y' &= w'z + wz'
\end{align*}

we now restrict $z$ to be the solution of the ODE

\begin{equation*}
z' + P(x)z = 0
\end{equation*}

with this it is possible to solve for $z$ by integrating

\begin{equation*}
\frac{z'}{z} = - P(x) \\
\end{equation*}

using $z$ we solve for $w$ by replacing $y$ inside the original ODE

\begin{align*}
w'z + wz' + P(x)wz &= Q(x)w^nz^n \\
w'z + w\left(z' + P(x)z\right) &= Q(x)w^nz^n \\
w'z &= Q(x)w^nz^n \\
\frac{w'}{w^n} &= Q(x)z^{n-1} \\
\end{align*}

the general solution to our original ODE can be simply obtained by multiplying
$w$ and $z$.

* Comments
This method, while functional, may not always be the most practical. In some
cases the differential equations for $w$ and $z$ may not have closed algebraic
solutions. A more traditional substitution may in some situations also be easier
than this method. Like always it is up to one to know which tool to apply for a
given problem.

* Example
Let's solve an example to show the method in practice

\begin{align*}
y' - 3x^2y &= -x^2y^3 \\
w'z + wz' - 3x^2wz &= -x^2w^3z^3 \\
w'z + w\left(z' - 3x^2z\right) &= -x^2w^3z^3
\end{align*}

solve now for $z$

\begin{align*}
z' - 3x^2z &= 0 \\
\frac{z'}{z} &= 3x^2 \\
z &= c e^{x^3}
\end{align*}

replace $z$ in the equation

\begin{align*}
w' &= -x^2w^3z^2 \\
- \frac{w'}{w^3} &= c^2 e^(2x^3)x^2 \\
\frac{1}{2 w^2} &= c^2\left(\frac{e^{2x^3}}{6} + k\right) \\
w &= \pm \frac{1}{c} \sqrt{\frac{3}{e^{2x^3} + k}}
\end{align*}

finally with $w$ and $z$ get $y$

\begin{equation*}
y = \pm e^{x^3} \sqrt{\frac{3}{e^{2x^3} + k}}
\end{equation*}