User Tools

Site Tools


howto:hambasics:sections:test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:hambasics:sections:test [2021/01/03 20:13] – [Differential Equations] va7fihowto:hambasics:sections:test [2021/02/13 19:14] (current) – [Cartesian vs Polar] va7fi
Line 7: Line 7:
 \$$ \Box ^2 = -25 \$$  \$$ \Box ^2 = -25 \$$ 
  
-It turns out that there is no //real// number such that when you multiply it by itself you get a negative number, but could we invent an //imaginary// one? +It turns out that there is no //real// number such that when you multiply it by itself you get a negative number.  But could we invent an //imaginary// one? 
  
 ===== Complex Numbers ===== ===== Complex Numbers =====
Line 24: Line 24:
  
 \begin{align*} \begin{align*}
-(1+i)^2 &= 1 + 2i + i^2 \\+(1+i)^2  
 +&= (1+i)\cdot(1+i) \\ 
 +&= 1 + 2i + i^2 \\
 &= 1 + 2i - 1 \\ &= 1 + 2i - 1 \\
 &= 2i &= 2i
Line 48: Line 50:
 ... we can also represent a complex number graphically on a complex plane by using the horizontal axis for the real part and the vertical axis for the imaginary part.  For example, \$ (1 + i) \$ would be represented as a point 45° up the horizontal axis and \$ \sqrt{2} \$ away from the origin: ... we can also represent a complex number graphically on a complex plane by using the horizontal axis for the real part and the vertical axis for the imaginary part.  For example, \$ (1 + i) \$ would be represented as a point 45° up the horizontal axis and \$ \sqrt{2} \$ away from the origin:
  
-{{ggb>/howto/hambasics/sections/polar.ggb}} +<WRAP center round info 80%>
 You can move the point around to look at other complex numbers on the plane. You can move the point around to look at other complex numbers on the plane.
 +</WRAP>
 +
 +{{ggb>/howto/hambasics/sections/polar.ggb}}
  
 To convert between the Cartesian \$(a,b) \$ and the Polar \$ (r \angle \theta) \$ representations, only simple trigonometry and Pythagoras is needed. To convert between the Cartesian \$(a,b) \$ and the Polar \$ (r \angle \theta) \$ representations, only simple trigonometry and Pythagoras is needed.
  
-^ \$$ a + ib \rightarrow r\angle \theta \$$ ^ \$$ r\angle \theta \rightarrow a+ib \$$ |+^ \$$ (a, b) \rightarrow (r\angle \theta\$$ ^ \$$ (r\angle \theta\rightarrow (a, b)\$$ |
 | \$$ r^2 = a^2 + b^2 \$$  |  \$$ a = r\cos\theta \$$  | | \$$ r^2 = a^2 + b^2 \$$  |  \$$ a = r\cos\theta \$$  |
 | \$$ \tan \theta = \dfrac{b}{a} \$$ | \$$ b = r\sin\theta \$$ | | \$$ \tan \theta = \dfrac{b}{a} \$$ | \$$ b = r\sin\theta \$$ |
Line 60: Line 64:
 Note that very often, we use radians instead of degrees for the angle.  There are a total 360° or 2π radians in a circle.  While most people are used to degrees, a radian is actually much easier to picture: Note that very often, we use radians instead of degrees for the angle.  There are a total 360° or 2π radians in a circle.  While most people are used to degrees, a radian is actually much easier to picture:
   * Imagine a circle.   * Imagine a circle.
-  * Now imagine the length from the centre to the circle (along the ``radius").+  * Now imagine the length from the centre to the circle (along the "radius").
   * Take that length and lay it down on the perimeter of the circle.   * Take that length and lay it down on the perimeter of the circle.
   * The angle that this length covers is 1 radian (because of the length of the radius on the circle).   * The angle that this length covers is 1 radian (because of the length of the radius on the circle).
-  * That's why a circle has 2π (because the circumference is 2πr) +  * That's why a circle has 2π radians (because the circumference is 2πr) 
  
 ==== Roots ==== ==== Roots ====
Line 76: Line 80:
 <hidden> <hidden>
 {{ complexroots.png?600 }} {{ complexroots.png?600 }}
-So \$z = 2\$ was to be expected since \$ 2^3 = 8 \$ but it looks like there'two more solutions. \\ \\+So \$z = 2\$ was to be expected since \$ 2^3 = 8 \$ but it looks like there are two more solutions. \\ \\
  
 To find them, we first notice that the three solutions are spread out evenly around the circle, that is they are 120° apart. To find them, we first notice that the three solutions are spread out evenly around the circle, that is they are 120° apart.
Line 140: Line 144:
 ===== Euler Identity and Polar-Cartesian Representations ===== ===== Euler Identity and Polar-Cartesian Representations =====
  
-In the previous section, we saw that a complex number \$z = a + ib \$ could be represented as a point \$(a, b)\$ on the complex plane, which could also be viewed in polar coordinates as \$r\angle \theta \$.  We saw that to convert between the Cartesian \$(a,b) \$ and the Polar \$ (r \angle \theta) \$ representations, only simple trigonometry and Pythagoras is needed:+In the previous section, we saw that a complex number \$z = a + ib \$ could be represented as a point \$(a, b)\$ on the complex plane, which could also be viewed in polar coordinates as (\$r\angle \theta\$.  We saw that to convert between the Cartesian \$(a,b) \$ and the Polar \$ (r \angle \theta) \$ representations, only simple trigonometry and Pythagoras is needed:
  
-^ \$$ a + ib \rightarrow r\angle \theta \$$ ^ \$$ r\angle \theta \rightarrow a+ib \$$ |+^ \$$ (a,b) \rightarrow (r\angle \theta\$$ ^ \$$ (r\angle \theta\rightarrow (a,b)\$$ |
 | \$$ r^2 = a^2 + b^2 \$$  |  \$$ a = r\cos\theta \$$  | | \$$ r^2 = a^2 + b^2 \$$  |  \$$ a = r\cos\theta \$$  |
 | \$$ \tan \theta = \dfrac{b}{a} \$$ | \$$ b = r\sin\theta \$$ | | \$$ \tan \theta = \dfrac{b}{a} \$$ | \$$ b = r\sin\theta \$$ |
Line 161: Line 165:
 ^ Algebraic |\$$z = a + ib\$$ |\$$ z = re^{i\theta} \$$ | ^ Algebraic |\$$z = a + ib\$$ |\$$ z = re^{i\theta} \$$ |
  
-This now allows us to simplify a lot of difficult mathematics.  For example let's look at the root problem \$z^3 = 8 \$.  Since the number 8 on the complex plane is the point \$(8,0)\$, in polar coordinates, it can be any of the following: \$8\angle 0, 8\angle 2\pi, 8\angle 4\pi, \cdots \$  This is because we can go around the circle as many times as we want and return to the same point.  Since we expect three roots, let's use the first three polar representations of 8:+This now allows us to simplify a lot of difficult mathematics.  For example let's look at the root problem \$z^3 = 8 \$ again.  Since the number 8 on the complex plane is the point \$(8,0)\$, in polar coordinates, it can be any of the following: \$8\angle 0, 8\angle 2\pi, 8\angle 4\pi, \cdots \$  This is because we can go around the circle as many times as we want and return to the same point.  Since we expect three roots, let's use the first three polar representations of 8:
  
 \$$ \$$
Line 192: Line 196:
 \$$z_1 = 1 + i = \sqrt{2}e^\left(i\frac{\pi}{4}\right) \quad \text{and} \quad z_2 = -1 + i = \sqrt{2}e^\left(i\frac{3\pi}{4}\right) \$$ \$$z_1 = 1 + i = \sqrt{2}e^\left(i\frac{\pi}{4}\right) \quad \text{and} \quad z_2 = -1 + i = \sqrt{2}e^\left(i\frac{3\pi}{4}\right) \$$
  
-Imagine having to add, subtract, multiply, divide or divide these together.  Or raise them to a power, or take a root of them.  Which of the two representations do you think would be easiest to use for each operation?+Imagine having to add, subtract, multiply, or divide these together.  Or raise them to a power, or take a root of them.  Which of the two representations do you think would be easiest to use for each operation?
  
 <hidden> <hidden>
Line 206: Line 210:
 \\ \\
  
-The lesson here is that since the polar representation uses exponents, and exponents turn multiplication into addition((\$ x^a \cdot x^b = x^{a+b} \$)), the polar representation is easiest for multiplication, division, exponentiation, and roots.  It's essentially why the [[howto/hambasics/sections/mathbasics#the_decibel |dB scale]] is so useful.+The lesson here is that since the polar representation uses exponents, and exponents turn multiplication into addition((\$ x^a \cdot x^b = x^{a+b} \$)), the polar representation is easiest for multiplication, division, exponentiation, and roots.  It's essentially why the [[howto/hambasics/sections/mathbasics#the_decibel |dB scale]] is so useful.  But addition and subtraction is intrinsically easier in Cartesian coordinates.
 ===== Important Algebraic Results ===== ===== Important Algebraic Results =====
   * Use the Euler identity to get the following two useful results:   * Use the Euler identity to get the following two useful results:
Line 318: Line 322:
  
 <WRAP center round info 80%> <WRAP center round info 80%>
-A differential equation is an equation that relates a function to its derivatives in some ways and the question is: given some information about the system, what's the function (or family of functions) that satisfy the differential equation.+  * A differential equation is an equation that relates a function to its derivatives in some ways and the question is: given some information about the system, what's the function (or family of functions) that satisfy the differential equation.
  
-In physics we often use a dot above the function to indicate a derivative with respect to time, where as in math, we'll often use an apostrophe.  Physicists don't like the apostrophe too much because they sometimes use it to denote a different coordinate system.  So don't let the notation confuse you:+  * In physics we often use a dot above the function to indicate a derivative with respect to time, where as in math, we'll often use an apostrophe.  Physicists don't like the apostrophe too much because they sometimes use it to denote a different coordinate system.  So don't let the notation confuse you:
 \$$ \dot{x}(t) = x'(t) = \frac{dx}{dt} \quad \text{and} \quad \ddot{x}(t) = x''(t) = \frac{d^2x}{dt^2} \$$ \$$ \dot{x}(t) = x'(t) = \frac{dx}{dt} \quad \text{and} \quad \ddot{x}(t) = x''(t) = \frac{d^2x}{dt^2} \$$
 </WRAP> </WRAP>
Line 348: Line 352:
  
  
-===== Under Construction ===== 
  
-Puisque \$ r \$ contient une racine carréil peut être réelou complexePour simplifier la notation, disons que: \$ \alpha = \dfrac{b}{2a} \qquad \text{et} \qquad \beta = \dfrac{\sqrt{|{b^2 - 4ac}|}}{2a} \$+What we've go so far says that our test function \$x(t) = e^{rt}\$ will satisfy the differential equation if \$r\$ is given by above equation.  There is still a lot to unpack however.  For examplesince \$r\$ contains a square rootit could be real or complex depending on the values of \$a, b,\$ and \$c\$ And as we saw above, if \$r\$ is real, then \$x(t)\$ will be a real exponential function.  But if \$r\$ is complex, then we can expect \$x(t)\$ to be some sort of sinusoidal function (recall the Euler Identity). 
 + 
 +To simplify the notation, let's define \$\alpha\$ and \$\beta\$ as: 
 +\$$ \alpha = \dfrac{b}{2a} \qquad \text{and} \qquad \beta = \dfrac{\sqrt{|{b^2 - 4ac}|}}{2a} \$$ 
 + 
 +Notice how the absolute value under the square root ensures that \$\beta\$ is always real. 
 + 
 +\$r\$ then:  
 + 
 +\$$ r = \left\{ \begin{array}{ll} -\alpha \pm \beta & \text{if } b^2 - 4ac > 0,\\  
 + -\alpha \pm i \beta & \text{if } b^2 - 4ac < 0, \end{array} \right. \$$ 
 + 
 +Let's examine both of these cases in more detail. 
 + 
 +==== Case 1: Over Damped Oscillation ==== 
 +When \$ b^2 - 4ac > 0 \$ , \$ r \$ is real and the general solution is:  
 + 
 +\begin{align*} 
 +x(t) &= A_1 e^{r_1 t} + A_2 e^{r_2 t} \\  
 +&= A_1 e^{( -\alpha + \beta) t} + A_2 e^{( -\alpha - \beta) t} \\  
 +&= A_1 e^{-\alpha t} e^{\beta t} + A_2 e^{-\alpha t} e^{-\beta t}  
 +\end{align*} 
 + 
 +\$$ x(t) = e^{-\alpha t} ( A_1 e^{\beta t} + A_2 e^{-\beta t} ) \$$ 
 + 
 +It's normal to have two constants of integration since our differential equation has a second degree derivative in it.  To find these constants, we'd need to know more about the system's initial conditions. 
 + 
 +==== Case 2: Under Damped ==== 
 +When \$ b^2 - 4ac < 0 \$ , \$ r \$ is complex and we'll be using the Euler identity to simplify our solutions 
 +  
 +\begin{align*} 
 +x(t) &= A_1 e^{r_1 t} + A_2 e^{r_2 t} \\  
 +&= A_1 e^{( -\alpha + i \beta) t} + A_2 e^{( -\alpha - i \beta) t} \\  
 +&= A_1 e^{-\alpha t} e^{i \beta t} + A_2 e^{-\alpha t} e^{-i \beta t} \\  
 +&= e^{-\alpha t} ( A_1 e^{i \beta t} + A_2 e^{-i \beta t} ) \\  
 +&= e^{-\alpha t} \Big( A_1 \big(cos( \beta t) + i \sin( \beta t) \big) + A_2 \big(cos( -\beta t) + i \sin( -\beta t) \big) \Big) \\ 
 +&= e^{-\alpha t} \Big( A_1 \big(cos(\beta t) + i \sin(\beta t) \big) + A_2 \big(\cos(\beta t) - i \sin(\beta t)\big)\Big) \\  
 +&= e^{-\alpha t} \Big( (A_1 + A_2) \cos(\beta t) + i (A_1 - A_2) \sin(\beta t) \Big) \\  
 +&= e^{-\alpha t} \Big( a_1 \cos(\beta t) + a_2 \sin(\beta t) \Big) \\  
 +&= e^{-\alpha t} \Big( A \sin \phi \cos(\beta t) + A \cos \phi \sin(\beta t) \Big)  \\ 
 +&= Ae^{-\alpha t} \Big(\sin \phi \cos(\beta t) + \cos \phi \sin(\beta t) \Big)  \\ 
 +\end{align*} 
 + 
 +In the last three lines, we've redefined the constants of integration a few times so that: 
 + 
 +\begin{align*} 
 +a_1 &= A_1 + A_2 & , a_2 &= i(A_1 - A_2) \\  
 +a_1 &= A \sin \phi & , a_2 &= A \cos \phi  
 +\end{align*} 
 + 
 +And we finally use one of the trig identities we proved earlier to write the solution as: 
 +\$$ x(t) = A e^{-\alpha t} \sin(\beta t + \phi) \$$ 
 + 
 +==== Case 3: Critically Damped ==== 
 +When \$ b^2 - 4ac = 0 \$ , \$ r = -\frac{b}{2a} \$ is real and negative but our test solution is under determined.  We'll instead propose a solution of the following type and test that it works: 
 +\begin{align*} 
 + && x(t) &= e^{rt}(A + Bt) \\ 
 +\Rightarrow && \dot x(t) &= re^{rt}(A + Bt) + Be^{rt} \\ 
 +            &&           &= e^{rt}\big(r(A + Bt) + B)\big) \\ 
 +            &&           &= e^{rt}(rA + B + Brt) \\ 
 +\Rightarrow &&\ddot x(t) &= re^{rt}(rA + B + Brt) + e^{rt}Br \\ 
 +            &&           &= e^{rt}\big(r(rA + B + Brt) + Br\big) \\ 
 +            &&           &= e^{rt}(Ar^2 + 2Br + Br^2t) \\ 
 +\end{align*} 
 + 
 + 
 + 
 + 
 +==== Exemple ==== 
 +Nous avons donc deux types de solutions complètement différents qui dépendent de trois paramètres \$ a, b, c \$. Pour voir comment ces paramètres affectent le graphique, imaginons qu'une de nos conditions initiales est \$ \phi = \frac{\pi}{2} \$ . Ça veut dire que: 
 + 
 +\$ \begin{align*} 
 +& a_1 = A \sin \pi/2 = A & & a_2 = A \cos \pi/2 = 0 \\  
 +\Rightarrow \qquad & A_1 + A_2 = A & & A_1 - A_2 = 0 \\  
 +\Rightarrow \qquad & A_1 = A/2 & & A_2 = A/2  
 +\end{align*} \$ 
 + 
 +Dans ce cas particulier, nous avons donc: 
 + 
 +\$ \begin{equation*} x(t) = \left\{ \begin{array}{rl} A e^{-\alpha t} \dfrac{e^{\beta t} + e^{-\beta t}}{2} & \text{si } b^2 - 4ac > 0 ,\\  
 +A e^{-\alpha t} \cos(\beta t) & \text{si } b^2 - 4ac < 0 ,\\  
 +\end{array} \right. \end{equation*} \$ 
  
 +FIXME Geogebra
  
howto/hambasics/sections/test.1609733585.txt.gz · Last modified: 2021/01/03 20:13 by va7fi