Definition — Differential Equation: Equation that involves derivatives of the function. (e.g., y'- 3x = 0)
- Notoriously hard to solve.
Problem: Find the closed form of a differential equation
Aside — Differential equations arise in the study of physical phenomenon or complex mathematicals structure (because studying any system means studying how it changes over distance/time/etc).
Q:
Get the closed form of
y' - 3x = 0
A:
y' - 3x = 0 \\ y' = 3x \\ y = \frac{3}{2}x^2 + c
This is NOT closed form (because of c).
Normally what you do at this point is measure the system to find c (plugging in numbers to solve for c).
Suppose we were given an initial value of [x_0, y(x_0)] (TODO what is this?)
Get we plug in the number ??? and get TODO.
c = TODO
Then we TODO (plug in values from the system to solve?)
Remember — The solution to an IVP is a number, which means there are numerical methods to solve.
TODO The stuff here should be thrown into a collapsable I think.
Professor’s Aside (TODO organize this somehow)
“Before I go over Euler’s method I want to talk about something else.”
Definition: A differential equation that consists of a linear combination of the derivatives of the function.
y' - 3y + 5x = 0
\boxed{ y(x_{i+1}) \sim y(x_i) + y'(x_i) h = y(x_i) + f(x_i, y(x_i))h }
Note — Euler’s only works on first-order linear differential equations. In other words, it must be of the form:
y'(x) = f(x,y)
Note — This algorithm is really sensitive to h (you want to use a small h) because we’re truncating the Taylor series.
How?
y' - 3y + 5x = 0 \\ y' = 3y - 5x \to y' = f(x,y)
We will use Taylor series to create an iterative method that works our way up
Some terrible derivation:
Our stepping method will be: step h
y(x_{i+1}) ~ ???
Professor: “x_{i+1} is really x_{i+h}” (TODO What does he mean by this)
We will approximate this though, so we’ll do
\boxed{ y(x_{i+1}) \sim y(x_i) + y'(x_i) h = y(x_i) + f(x_i, y(x_i))h }
Notes:
We are given x_0 = 1, x_1 = 2, y(x_0)=3, y(x_1)=7
y' - 3y + 5x = 0 \\ y' = 3y - 5x \to y' = f(x,y)
??? We do something here. I think we are jumping to the real solution and calculating something to compare against?
y = \frac{5}{3} x = \frac{5}{9} + c e^{3x} \\ c = 0.038723275 \\~\\ y(2) = 19.510973
So we’ll start at h = 0.1 (usually we’d have it smaller, but we have to be practical in class)
y(1.1) = 3 + (3(3) - 5(1)) (0.1) = 3.4
y(1.2) = 3.4 + (3(3.4) - 5(1.1)) (0.1) = 3.87
y(1.3) = 3.87 + (3(3.87) - 5(1.2)) (0.1) = 4.431
y(1.4) = 4.431 + (3(4.431) - 5(1.3)) (0.1) = 5.1103
y(1.5) = 5.1103 + (3(5.1103) - 5(1.4)) (0.1) = 5.94339
y(1.6) = 5.94339 + (3(5.94339) - 5(1.5)) (0.1) = 6.976407
y(1.7) = 6.976407 + (3(6.976407) - 5(1.6)) (0.1) = 8.2693291
…
y(2) = 14.66172...
TODO Fill in the …
Use — If we have the form y' = f(x,y), we can solve with Euler’s like this.
y'(x) = 5y + ln(x+1) \\~\\ x_0 = 1, y(x_0) = 2.5, h = 0.1
Evaluate at x_f = 2
This is the appropriate form, it’s hard to solve, but Euler can do it.
\boxed{ y(x_{i+1}) \sim y(x_i) + y'(x_i) h = y(x_i) + f(x_i, y(x_i))h }
y(1.1) = 3 + (3(3) - 5(1)) (0.1) = 3.4
y(1.2) = 3.4 + (3(3.4) - 5(1.1)) (0.1) = 3.87
y(1.3) = 3.87 + (3(3.87) - 5(1.2)) (0.1) = 4.431
We are given x_0 = 1, x_1 = 2, y(x_0)=3, y(x_1)=7
y' - 3y + 5x = 0 \\ y' = 3y - 5x \to y' = f(x,y)
y(1.1) = y(1.0) + f(1.0, y(1.0)) (0.1) \\ y(1.1) = 2.5 + f(1.0, 2.5) (0.1) = 3.81931471805599453094
y(1.2) = y(1.1) + f(1.1, y(1.1)) (0.1) \\ y(1.2) = 5.80316581155692952766
y(1.4) = 5.80316581155692952766 + f(1.2, 5.80316581155692952766) (0.1) \\ = 8.78359445337182130844
y(1.5) = 8.78359445337182130844 + f(1.3, 8.78359445337182130844) (0.1)
y(1.6) = 19.97557076226225353857
y(1.7) = 30.05498521658079581437
y(1.8) = 45.17802896937393735770
y(1.9) = 67.86636863136193437557
y(2.0) = 101.90251488876101738735
y(2.1) = 152.96024340684076891534
y(2.2) = 229.55022633912796434215
y(2.3) = 344.43847971984105656942
y(2.4) = 516.77403466074215294044
y(2.5) =
DAWG WHAT THE FUCK DID I DO WRONG I THOUGH I WAS DOING SO GOOD