initial commit
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
uglyURLS = true
|
||||||
|
|
||||||
|
relativeURLs = true
|
||||||
|
|
||||||
|
publishDir = "public"
|
||||||
|
pygmentsUseClasses = true
|
||||||
|
|
||||||
|
assetDir = "themes/zettels/assets"
|
||||||
|
languageCode = 'en-us'
|
||||||
|
DefaultContentLanguage = "en"
|
||||||
|
title = 'Sasserisop: MATH 201 Notes'
|
||||||
|
theme = "zettels"
|
||||||
|
#baseURL="127.0.0.1/hugo"
|
||||||
|
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = ["HTML", "JSON"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
theme = "duotone-light"
|
||||||
|
bear = true
|
||||||
|
favicon = "favicon.ico"
|
||||||
|
author = "Cristian Rojas"
|
||||||
|
|
||||||
|
# Enable tags.
|
||||||
|
[taxonomies]
|
||||||
|
tag = "tags"
|
||||||
|
|
||||||
|
|
||||||
|
# Allows rendering the html inside markdown
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe= true
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
# Bernoulli's equation:
|
||||||
|
### $$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad\quad n\in\mathbb{R},\quad n\ne0,1$$
|
||||||
|
>I'm calling this #de_b_type1. This is in standard form btw.
|
||||||
|
|
||||||
|
It looks almost like a linear equation! In fact if n=0 it is by definition. We will see further that if n=1 you get a separable equation. So we ignore the cases when $n=0,1$ as these can be solved with prior tools.
|
||||||
|
|
||||||
|
Bernoulli's equations are important as you will see it in biology and in engineering.
|
||||||
|
If y is + then y(x)=0 is a solution to the equation:
|
||||||
|
$\frac{dy}{dx}+0=0\quad\Rightarrow \quad0=0$
|
||||||
|
Let's move the y to the LHS:
|
||||||
|
$y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$
|
||||||
|
notice that y(x)=0 is no longer a solution! It was lost due to dividing by zero. So from here on out we will have to remember to add it back in our final answers.
|
||||||
|
let $y^{1-n}=u$
|
||||||
|
Differentiating this with respect to x gives us:
|
||||||
|
$(1-n)y^{-n}\frac{ dy }{ dx }=\frac{du}{dx}$
|
||||||
|
$y^{-n}\frac{ dy }{ dx }=\frac{ du }{ dx }{\frac{1}{1-n}}$
|
||||||
|
substituting in we get:
|
||||||
|
$y^{-n}\frac{ dy }{ dx }+P(x)u=Q(x)=\frac{ du }{ dx }{\frac{1}{1-n}+P(x)u}$
|
||||||
|
|
||||||
|
and we get a linear equation again: (Handy formula if you wanna solve specific Bernoulli equations quick.)
|
||||||
|
$$\frac{1}{1-n}\frac{ du }{ dx }+P(x)=Q(x)\quad \Box$$
|
||||||
|
>Remember when I said that when n=1 the equation becomes a separable equation?:
|
||||||
|
>$y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$
|
||||||
|
>let $n=1$
|
||||||
|
>$y^{-1}\frac{ dy }{ dx }+P(x)=Q(x)$
|
||||||
|
>$y^{-1}dy=dx(Q(x)-P(x))$ <-This is indeed a separable equation #de_s_type1
|
||||||
|
---
|
||||||
|
# Examples of Bernoulli's equation:
|
||||||
|
#ex #de_b_type1 Find the general solution to:
|
||||||
|
$y'+y=(xy)^2$
|
||||||
|
Looks like a Bernoulli equation because when we distribute the $^2$ we get $x^2y^2$ on the RHS. This also tells us that n=2
|
||||||
|
$y'+y=x^2y^2$
|
||||||
|
$y'y^{-2}+y^{-1}=x^2$
|
||||||
|
>Note that we lost the y(x)=0 solution here, we will have to add it back in the end.
|
||||||
|
|
||||||
|
let $u=y^{1-n}=y^{-1}$
|
||||||
|
Differentiating wrt. x we get: $\frac{du}{dx}=-y^{-2}{\frac{dy}{dx}}$
|
||||||
|
$y^{-2}{\frac{dy}{dx}=-\frac{ du }{ dx }}$
|
||||||
|
$y^{-2}{\frac{dy}{dx}+y^{-1}=-\frac{ du }{ dx }}+y^{-1}$
|
||||||
|
${x^2=-\frac{ du }{ dx }}+y^{-1}$
|
||||||
|
$x^2=-\frac{du}{dx}+u$
|
||||||
|
$\frac{du}{dx}-u=-x^2$
|
||||||
|
Yay we have a linear equation now! We can solve it using the techniques & formulas we learned for them.
|
||||||
|
let $P(x)=-1 \quad Q(x)=-x^2 \qquad I(x)=e^{\int -1 \, dx}=e^{-x}$
|
||||||
|
$u=-e^{x}\int e^{-x}x^2 \, dx$
|
||||||
|
How to integrate this? You can use integration by parts:
|
||||||
|
LIATE: log, inv trig, alg, trig, exp
|
||||||
|
$\int fg' \, dx=fg-\int f'g \, dx$
|
||||||
|
let $f=x^2 \qquad f'=2x \qquad g'=e^{-x} \qquad g=-e^{-x}$
|
||||||
|
$u=-e^{x}\left( x^2(-e^{-x})-\int 2x(-e^{-x}) \, dx \right)$
|
||||||
|
$u=-e^{x}\left( -x^2e^{-x}+2\int xe^{-x} \, dx \right)$
|
||||||
|
let $f=x \qquad f'=1 \qquad g'=e^{-x} \qquad g=-e^{-x}$
|
||||||
|
$u=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-\int -e^{-x} \, dx \right) \right)$
|
||||||
|
$\frac{1}{y}=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-e^{-x} +C\right) \right)$
|
||||||
|
$\frac{1}{y}=x^2+2(x+1+Ce^x)$
|
||||||
|
$\frac{1}{y}=x^2+2x+2+Ce^x$
|
||||||
|
The general solution to the DE is:
|
||||||
|
$$y(x)=\frac{1}{x^2+2x+2+Ce^x} \quad\text{as well as}\quad y(x)=0$$
|
||||||
|
|
||||||
|
---
|
||||||
|
#end of lecture 3
|
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
|
||||||
|
## Exact equations
|
||||||
|
two variable equations
|
||||||
|
$dF=\frac{ \partial F }{ \partial x }dx+\frac{ \partial F }{ \partial y }dy=0$ suppose it equals to zero (as shown in the equation) you get a horizontal plane (a constant)
|
||||||
|
so $F(x,y)=C$
|
||||||
|
the solution to these exact equations is given by $F()$ but how do we recover $F$ from it's partial derivatives?
|
||||||
|
Equation of the form: $$M(x,y)dx+N(x,y)dy=0$$
|
||||||
|
>I'm calling this #de_e_type1
|
||||||
|
|
||||||
|
is called exact if $M(x,y)=\frac{ \partial F }{ \partial x }$ and $N(x,y)=\frac{ \partial F }{ \partial y }$ for some function $F(x,y)$
|
||||||
|
then differentiating we get:
|
||||||
|
$\frac{ \partial M }{ \partial y }=\frac{ \partial^{2} F }{ \partial y\partial x }$
|
||||||
|
$\frac{ \partial N }{ \partial x }=\frac{ \partial^{2} F }{ \partial x\partial y }$ Order of going in x then y vs y then x doesn't matter as it lands you on the same point.
|
||||||
|
We equate the two and obtain a way to check if an equation is exact:
|
||||||
|
Exact equation$\Rightarrow \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$ if it's continuous (?)
|
||||||
|
also: Exact equation$\Leftarrow \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$
|
||||||
|
Test for exactness:
|
||||||
|
exact $\iff \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$ (this can be proved, but it wasn't proved in class)
|
||||||
|
#end of lecture 4
|
||||||
|
#start of lecture 5
|
||||||
|
last lecture we talked about exact equations
|
||||||
|
We only knew about N and M which are the partials of F()
|
||||||
|
so how do we recover F?
|
||||||
|
|
||||||
|
between N and M, choose the one that is easier to integrate. Let's choose M.
|
||||||
|
$M=\frac{ \partial F }{ \partial x }$
|
||||||
|
$F(x,y)=\int M(x,y) \, dx$
|
||||||
|
$F(x,y)=\int M(x,y) \, dx+g(y)$ where g is any function of y. The constant of integration may depend on y because if you undo by differentiating with respect to x the term would still disappear.
|
||||||
|
|
||||||
|
now 2nd condition: $N=\frac{ \partial F }{ \partial y }=\frac{ \partial }{ \partial y }\int M(x,y) \, dx+g'(y)=N(x,y)$
|
||||||
|
to reiterate, first test if equation is exact, then take m or n and integrate with x or y respectively then differentiate with respect to y or x respectively.
|
||||||
|
|
||||||
|
#ex #de_e_type1
|
||||||
|
$$\underbrace{( 2xy+3 )}_{ M }dx+\underbrace{ (x^2-1) }_{N}dy=0$$
|
||||||
|
$\frac{ \partial M }{ \partial y }=2x=\frac{ \partial N }{ \partial x }=2x$ so its exact!
|
||||||
|
$\frac{ \partial F }{ \partial y }=N(x,y)=x^2-1$
|
||||||
|
integrate $N(x,y)$ wrt to y:
|
||||||
|
$F(x,y)=(x^2-1)y+g(x)$ (side note: although we say g is any function, it should be differentiable tho)
|
||||||
|
$\frac{ \partial F }{ \partial x }=M(x,y)=2xy+3=2xy+g'(x)$
|
||||||
|
|
||||||
|
|
||||||
|
$g(x)=3x+C_{1}$
|
||||||
|
$F(x,y)=(x^2-1)y+g(x)\Rightarrow F(x,y)=(x^2-1)y+3x=C_{2}-C_{1}=C$
|
||||||
|
We are done:
|
||||||
|
$$(x^2-1)y+3x=C$$
|
||||||
|
there is also another method to solve exact equations (see Wikipedia article, but the prof says this method is easier, I believe him)
|
|
@ -0,0 +1,134 @@
|
||||||
|
|
||||||
|
#start of lecture 2
|
||||||
|
## Homogenous equations:
|
||||||
|
$$\frac{dy}{dt}=f\left( \frac{y}{t} \right)$$
|
||||||
|
>I'm calling this #de_h_type1
|
||||||
|
|
||||||
|
let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$
|
||||||
|
so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$
|
||||||
|
The homogenous equation has been converted into a separable DE!
|
||||||
|
$\frac{du}{dt}=\frac{f(u)-u}{t}$
|
||||||
|
$\frac{du}{f(u)-u}=\frac{dt}{t}$
|
||||||
|
## Another way you can write a homogenous equation:
|
||||||
|
$$\frac{dy}{dx}=G(ax+by)\quad \text{where a, b }\in \mathbb{R}$$
|
||||||
|
>I'm calling this #de_h_type2
|
||||||
|
|
||||||
|
Then, let $u=ax+by$
|
||||||
|
$\frac{du}{dx}=a+b{\frac{dy}{dx}}$
|
||||||
|
$\frac{dy}{dx}=\frac{1}{b}{\frac{du}{dx}}-\frac{a}{b}=G(u)$
|
||||||
|
Again, the homogenous equation has been converted to a separable DE!
|
||||||
|
$dx=\frac{du}{b{G(u)+\frac{a}{b}}}$
|
||||||
|
Just integrate both sides as usual and you're chilling.
|
||||||
|
## Examples of homogenous equations:
|
||||||
|
#ex #de_h_type1
|
||||||
|
$$\frac{dy}{dx}=\frac{{x+y}}{x-y} \quad x>y\quad\text{This condition is added so the denominator}\ne 0$$
|
||||||
|
|
||||||
|
but $\frac{{x+y}}{x-y}\ne f(\frac{y}{x})$... Or is it? How can this be written as a homogenous equation?
|
||||||
|
divide the top and bottom by x:
|
||||||
|
$\frac{dy}{dx}=\frac{{1+\frac{y}{x}}}{1-\frac{y}{x}}$
|
||||||
|
Yay! now it's a function of $\frac{y}{x}$
|
||||||
|
let $u=\frac{y}{x} \quad \frac{dy}{dx}=u+x{\frac{du}{dx}}$
|
||||||
|
$\frac{dy}{dx}=\frac{1+u}{1-u}=u+x{\frac{du}{dx}}$
|
||||||
|
$\frac{dx({f(u)-u})}{x}=du$
|
||||||
|
$\frac{dx}{x}=\frac{du}{{f(u)-u}}$
|
||||||
|
>That's odd, why is it not $\frac{du}{f(u)-u}=\frac{x}{dx}$? I got this by moving the top over.
|
||||||
|
(it's because you must move all multiplicative factors when using this technique of moving the top. Be careful!)
|
||||||
|
|
||||||
|
$\int\frac{dx}{x}=\int\frac{du}{{f(u)-u}}$
|
||||||
|
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u}}{1-u}-u}$
|
||||||
|
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u-u+u^2}}{1-u}}$
|
||||||
|
$\ln\mid x\mid=\int \frac{1-u}{{1+u^2}}du$
|
||||||
|
>let $1+u^2=v \quad dv=2udu$
|
||||||
|
$=\int \frac{{1-u}}{v} \, du$ Gah, doesn't work. I didn't notice I could split the integral up first.
|
||||||
|
|
||||||
|
$\ln\mid x\mid=\int \frac{1}{{1+u^2}}\,du-\int \frac{u}{1+u^2} \, du=\arctan\left( \frac{y}{x} \right)+C-I_{0}$
|
||||||
|
for $I_{0}$ let $v=1+u^2 \quad dv=2udu$
|
||||||
|
$I_{0}=\int \frac{u}{v} \, \frac{dv}{2u}=\frac{1}{2}\int \frac{dv}{v}=\frac{1}{2}\ln(1+u^2)$
|
||||||
|
> ^Note no abs value needed in the $\ln()$ as $1+u^2$ is always +
|
||||||
|
|
||||||
|
$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln(1+u^2)$
|
||||||
|
$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln\left( 1+\frac{y^2}{x^2} \right)$
|
||||||
|
$\mid x\mid=e^{\arctan(\frac{y}{x})+C-\ln(\sqrt{ 1+y^2/x^2 })}$
|
||||||
|
$x=\frac{e^{\arctan(y/x)}A}{\sqrt{ 1+\frac{y^2}{x^2} }}$
|
||||||
|
$x\sqrt{ 1+\frac{y^2}{x^2}} ={e^{\arctan(y/x)}A}$
|
||||||
|
So the final general solution to the problem is:
|
||||||
|
#### $$\sqrt{ x^2+y^2 }=e^{\arctan\left( \frac{y}{x} \right)}A$$
|
||||||
|
---
|
||||||
|
|
||||||
|
#ex #de_h_type2 $$(2x-2y-1)dx+(x-y+1)dy=0$$
|
||||||
|
Can we write it in the form $\frac{dy}{dx}=G(ax+by)$?
|
||||||
|
$(x-y+1)dy=-(2x-2y-1)dx$
|
||||||
|
$\frac{dy}{dx}=\frac{{2y+1-2x}}{x-y+1}$
|
||||||
|
factor out a -2?
|
||||||
|
$\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
|
||||||
|
Yep! looks like a #de_h_type2
|
||||||
|
let $u=x-y$
|
||||||
|
$\frac{du}{dx}=1-\frac{dy}{dx}$
|
||||||
|
$1-\frac{du}{dx}=\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
|
||||||
|
>Obviously we don't work with x and y as I was entailing above, substitute $u=x-y$ in you silly goose.
|
||||||
|
|
||||||
|
$1-\frac{du}{dx}=-2\frac{{u-\frac{1}{2}}}{u+1}$
|
||||||
|
$\frac{du}{dx}=2\frac{{u-\frac{1}{2}}}{u+1}+1$
|
||||||
|
$\frac{du}{dx}=\frac{2u-1}{u+1}+1$
|
||||||
|
$\frac{du}{dx}=\frac{{2u-1+u+1}}{u+1}$
|
||||||
|
$\frac{du}{dx}=\frac{3u}{u+1}$
|
||||||
|
$\frac{(u+1)du}{3u}=dx$
|
||||||
|
$\int \frac{(u+1)du}{3u}=\int dx$
|
||||||
|
>$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=\ln\mid x\mid+C$
|
||||||
|
>Ah, I made a mistake. $\int dx \ne \ln\mid x\mid+C$
|
||||||
|
|
||||||
|
$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=x+C$
|
||||||
|
> Okay, now that we have integrated, we can start talking in terms of x and y again
|
||||||
|
|
||||||
|
$\frac{x-y}{3}+\frac{1}{3}\ln\mid x-y\mid = x+C$
|
||||||
|
$x-y+\ln\mid x-y\mid=3x+C$
|
||||||
|
$\ln\mid x-y\mid=C+y+2x$ < this is where he moved the C to the left
|
||||||
|
$\mid x-y\mid=e^Ce^ye^{2x}$
|
||||||
|
$x-y=Ae^ye^{2x}$
|
||||||
|
$A(x-y)=e^{y+2x}$
|
||||||
|
> I know that above step looks illegal, but the prof did this (indirectly, he moved C to the LHS in a prior step without regarding it's sign). I wonder what happens if A was 0 though? Do we get divide by zero errors? Thinking about it more, we are changing $x-y=0$ to $e^{y+2x}=0$ when $A=0$ The first one has a solution (y=x) the second loses that solution because of ln(0) issues (gives a function that's undefined for all x). when checking y(x)=x in the DE, it is a valid solution. So perhaps it is an illegal step! Because we lost a valid solution. I'll have to check with the prof.
|
||||||
|
> Interestingly, if we act like $e^{y+2x}=0$ is defined, we get $\frac{dy}{dx}=-2$
|
||||||
|
>
|
||||||
|
>Proof:
|
||||||
|
>$\lim_{ n \to 0 }e^{y+2x}=n$
|
||||||
|
>$\lim_{ n \to 0 }\ln(n)=y+2x$
|
||||||
|
>$\lim_{ n \to 0 }\frac{d}{dx}\ln(n)=0=\frac{dy}{dx}+2$
|
||||||
|
>$\frac{dy}{dx}=-2\quad \Box$
|
||||||
|
>so from $\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$ we get:
|
||||||
|
>$-2=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
|
||||||
|
>$x-y+1=x-y-\frac{1}{2}$
|
||||||
|
>$1=-\frac{1}{2}$
|
||||||
|
>So what does this all mean? I honestly have no idea. I think it means we assumed that $e^{y+2x}=0$ is defined and because we arrived at a contradiction, our assumption was wrong. That didn't really get us to show if it was a valid solution or not like I imagined.
|
||||||
|
|
||||||
|
We can rearrange to our liking, but we have found the general solution to the DE:
|
||||||
|
#### $$x-y=Ae^{2x+y}$$
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
|
||||||
|
#start of lecture 4
|
||||||
|
## Linear coefficients equations
|
||||||
|
$$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0 \qquad a_{1},b_{1},c_{1},a_{2},b_{2},c_{2}\in \mathbb{R}$$
|
||||||
|
> I'm calling this #de_LC_type1
|
||||||
|
|
||||||
|
imagine $c_{1},c_{2}=0$ It becomes a homogenous equation! #de_h_type2
|
||||||
|
|
||||||
|
so can we make them 0?
|
||||||
|
let $x=u+k$
|
||||||
|
$y=v+l$
|
||||||
|
where $k,l$ are constants hand picked such that the following terms equal 0:
|
||||||
|
$(a_{1}u+b_{1}v+\underbrace{\cancel{ c_{1}+a_{1}k+b_{1}l } }_{ 0 })du+(a_{2}u+b_{2}v+\underbrace{ \cancel{ c_{2}+a_{2}k+b_{2}l } }_{ 0 })dv=0$
|
||||||
|
In order for these two terms to equal zero, we have to solve this linear system of equations:
|
||||||
|
$a_{1}k+b_{1}l=-c_1$
|
||||||
|
$a_{2}k+b_{2}l=-c_{2}$
|
||||||
|
|
||||||
|
if $\det\begin{pmatrix}a_{1} & b_{1} \\a_{2} & b_{2}\end{pmatrix}\ne0$ the system is solvable and the DE turns into a homogenous equation.
|
||||||
|
if $\det\begin{pmatrix}a_{1} & b_{1} \\a_{2} & b_{2}\end{pmatrix}=0 \Rightarrow$ the system is unsolvable but we get an equation of type $\frac{ dy }{ dx }=G(ax+by)$ (also homogenous)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
#ex #de_LC_type1
|
||||||
|
$$(-3x+y+6)dx+(x+y+2)dy=0$$
|
||||||
|
let $x=u+k$
|
||||||
|
$y=v+l$
|
||||||
|
differentiating we get: $dx=du ,\quad dy=dv$
|
||||||
|
$(-3u+v+6-3k+l)du+(u+v+2+k+l)dv=0$
|
||||||
|
we want $6-3k+l$ and $2+k+l$ to equal 0
|
||||||
|
so:
|
||||||
|
$-3k+l=-6$
|
||||||
|
$k+l=-2$
|
||||||
|
$det\begin{pmatrix}-3 & 1 \\1 & 1\end{pmatrix}=-4$ //you call it a fish? He can call it a dinosaur if he wanted to :D
|
||||||
|
solving gives us:
|
||||||
|
$k=1,l=-3$
|
||||||
|
so $x=u+1 \quad y=v-3$
|
||||||
|
$(-3u+v)du+(u+v)dv=0$ //Beautiful! It's homogenous now
|
||||||
|
$\frac{ dv }{ du }=\frac{{3u-v}}{u+v}$
|
||||||
|
divide top and bottom by u so we turn the homogenous equation into the form #de_h_type1 and solve it using the tools we developed from lecture 2.
|
||||||
|
$\frac{ dv }{ du }=\frac{{3-\frac{v}{u}}}{1+\frac{v}{u}}$
|
||||||
|
|
||||||
|
$\frac{v}{u}=w \quad v=uw \quad \frac{ dv }{ du }=w+u\frac{ dw }{ du }$
|
||||||
|
$w+u\frac{ dw }{ du }=\frac{{3-w}}{1+w}$ If you remember from lecture 2, after these substitutions the equation should now be separable, we just move the w terms to one side and the u terms to the other:
|
||||||
|
$u\frac{ dw }{ du }=\frac{{3-2w-w^2}}{1+w}$
|
||||||
|
$-\frac{{w+1}}{w^2+2w-3}dw=\frac{du}{u}$ <- Like that :)
|
||||||
|
$\int-\frac{{w+1}}{w^2+2w-3}dw=\int\frac{du}{u}$
|
||||||
|
let $z=w^2+2w-3$
|
||||||
|
$dz=2(w+1)dw$
|
||||||
|
$\frac{-1}{2}\int \frac{dz}{z}=\ln\mid u\mid$
|
||||||
|
$\frac{-1}{2}\ln|z|+C=\ln\mid u\mid$
|
||||||
|
$\ln\mid z\mid^{1/2}+\ln\mid u\mid=C$
|
||||||
|
$\ln(\mid z\mid^{1/2}\mid u\mid)=C$
|
||||||
|
$\mid z\mid^{1/2}u=e^C$
|
||||||
|
> How did he get rid of the abs()? I'm not sure. But he fixes the problem right after:
|
||||||
|
|
||||||
|
$\mid z\mid u^2=e^{2C}$
|
||||||
|
> Funny enough, after that step above of squaring both sides is done, it's like he never even dropped the abs to begin with. All solutions are reobtained again.
|
||||||
|
|
||||||
|
$zu^2=A$
|
||||||
|
> This step I can understand.
|
||||||
|
|
||||||
|
$\left( \left( \frac{v}{u} \right)^2+2\frac{v}{u}-3 \right)u^2=A$
|
||||||
|
remember $u=x-1 \quad v=y+3$
|
||||||
|
$$\left( \left( \frac{{y+3}}{x-1} \right)^2+\frac{2(y+3)}{x-1}-3 \right)(x-1)^2=A$$
|
||||||
|
you can "simplify" it to: $(y+3)^2+2(y+3)(x-1)-3(x-1)^2=A$ But we are done.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
|
||||||
|
*The world is non-linear, many solutions, many paths to the solution. It's why linear equations play so nice. We just look down it's path and we will know that it's a straight line for eternity.*
|
||||||
|
|
||||||
|
# Linear equation:
|
||||||
|
$$a(x)\frac{ dy }{ dx }+b(x)y=f(x)$$
|
||||||
|
>I'm calling this #de_L_type1
|
||||||
|
|
||||||
|
if we assume $b(x)=a'(x)$ it kinda starts to look like a product rule
|
||||||
|
$a(x)y'+a'(x)y=f(x)=(ay)'$
|
||||||
|
$ay=\int f(x) \, dx$ <-yay! We can find the solutions to y.
|
||||||
|
|
||||||
|
we can rewrite the linear equation in what's called standard form:
|
||||||
|
$$\frac{ dy }{ dx }+P(x)y=Q(x)$$ (I'm calling this #de_L_type2 )
|
||||||
|
we will define a function $\mu(x)$ called the integration factor, also expressed as $I(x)$
|
||||||
|
Multiply both sides by $\mu(x)$
|
||||||
|
$\mu(x) \frac{ dy }{ dx }+\underbrace{ \mu(x)P(x) }_{ \mu'(x) }y=\mu(x)Q(x)$
|
||||||
|
Like shown above we imagine if $\mu(x) P(x)=\mu'(x)$ as it starts to look like the product rule again.
|
||||||
|
$(\mu y)'=\mu(x)Q(x)$
|
||||||
|
This is nice as now we can integrate both sides as usual and get a solution for y.
|
||||||
|
$y=\frac{1}{\mu(x)}\int \mu(x)Q(x) \, dx$ #remember
|
||||||
|
But what is $\mu(x)$? How do we find it?
|
||||||
|
In order for $\mu(x) P(x)=\mu'(x)$ to be true, $\frac{ d\mu }{ dx }=\mu(x)P(x)\Rightarrow \frac{ d\mu }{ \mu }=P(x)dx\Rightarrow\int \frac{d\mu}{\mu}=\int P(x) \, dx\Rightarrow\ \ln\mid \mu\mid=\int P(x) \, dx$
|
||||||
|
>I'm not sure why the professor allows the absolute value to be dropped in the following step, I think he said that he argues all solutions can be found even if we focus only where $\mu$ is +, idk.
|
||||||
|
|
||||||
|
finally we get that $\mu(x)=I(x)=e^{\int P(x) \, dx}\quad \Box$ #remember
|
||||||
|
|
||||||
|
---
|
||||||
|
#end of lecture 2 #start of lecture 3
|
||||||
|
# Examples of linear equations:
|
||||||
|
#ex #de_L_type2 Find the general solution to the equation:
|
||||||
|
## $$(1+\sin(x))y'+2\cos(x)y=\tan(x)$$
|
||||||
|
let $a(x)=1+sin(x)\qquad b(x)=2\cos(x)$
|
||||||
|
we can see that $b(x)\ne a'(x)$ :( so we cant use #de_L_type1
|
||||||
|
let's rearrange it into standard form:
|
||||||
|
$y'+\frac{{2\cos(x)}}{1+\sin(x)}=\frac{\tan(x)}{1+\sin(x)}$
|
||||||
|
$P(x):=\frac{2\cos(x)}{1+\sin(x)} \qquad Q(x)=\frac{\tan(x)}{1+\sin(x)}$
|
||||||
|
then $I(x)=e^{\int {2\cos(x)}/(1+\sin(x))\, dx}$
|
||||||
|
let $u=1+\sin(x) \qquad du=\cos(x)dx$
|
||||||
|
$I(x)=e^{\int \frac{2\cos(x)}{u} \, \frac{du}{\cos(x)}}$
|
||||||
|
$I(x)=e^{2\ln\mid u\mid}$
|
||||||
|
$I(x)=\mid u\mid^2$
|
||||||
|
$I(x)=\mid1+\sin(x)\mid^2$
|
||||||
|
$I(x)=(1+\sin(x))^2$
|
||||||
|
$y=\frac{1}{I(x)}\int I(x)Q(x) \, dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}\int (\frac{(1+\sin(x))^2\tan(x)}{1+\sin(x)} \, dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}\int \tan(x)+\frac{\sin^2(x)}{\cos(x)} \, dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\int \frac{\sin^2(x)}{\cos(x)} \, dx)$
|
||||||
|
>using u substitution doesnt work for the second integral because I got $\int\frac{\sin(x)}{u}du \qquad u=\cos(x)$
|
||||||
|
>could try using $\sin^2(x)=\frac{{1-\cos(2x)}}{2}$ but looks hard with the 2x term,
|
||||||
|
>let's try using $\sin^2(x)=1-\cos^2(x)$ instead. (also because I also remember this is what we used in class)
|
||||||
|
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\int \frac{1-\cos^2(x)}{\cos(x)} \, dx)$
|
||||||
|
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\ln\mid sec(x)+\tan(x)\mid+\int -\cos(x) \, dx)$
|
||||||
|
Albeit a bit ugly, we have found the general solution to the DE:
|
||||||
|
$$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\ln\mid sec(x)+\tan(x)\mid-\sin(x)+C)$$
|
||||||
|
|
||||||
|
---
|
||||||
|
#ex #IVP #de_L_type2
|
||||||
|
## $$y'+\tan(x)y=\cos^2(x) \qquad y\left( \frac{\pi}{4} \right)=\frac{1}{2}$$
|
||||||
|
Looks like a linear equation with an initial value.
|
||||||
|
$P(x)=\tan(x) \qquad Q(x)=\cos^2(x) \qquad I(x)=e^{\int \tan(x) \, dx}$
|
||||||
|
$I(x)=e^{\ln\mid sec(x)\mid}$
|
||||||
|
$I(x)=\mid sec(x)\mid$
|
||||||
|
$I(x)=sec(x)$
|
||||||
|
> The prof simply drops the absolute value. I don't understand why. Sigma asf tbh. I think it's because he said linear DE are nice because their solutions are unique with an IVP, non linear equations are not necessarily unique. So if we find one solution we know that we found the only solution possible.
|
||||||
|
|
||||||
|
$y=\cos(x)\int sec(x)\cos^2(x) \, dx$
|
||||||
|
$y=\cos(x)\int \cos(x) \, dx$
|
||||||
|
$y=cos(x)(sin(x)+C)$
|
||||||
|
Now we issue the initial value:
|
||||||
|
$\frac{1}{2}=\cos\left( \frac{\pi}{4} \right)\sin\left( \frac{\pi}{4}+C) \right)$
|
||||||
|
$\frac{\frac{1}{2}}{\frac{1}{\sqrt{ 2 }}}=\frac{\sqrt{ 2 }}{2}=\frac{1}{\sqrt{ 2 }}=\sin\left( \frac{\pi}{4} \right)$
|
||||||
|
$C=0$
|
||||||
|
By plugging in C=0 in the general solution we get the solution to the IVP, as stated earlier, there can only be one solution to a linear IVP DE:
|
||||||
|
### $$y=\cos(x)\sin(x)$$
|
||||||
|
|
||||||
|
---
|
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
#start of lec 8 (sept 22)
|
||||||
|
last lecture we talked about $ay''+b'y+cy=f(t)$
|
||||||
|
|
||||||
|
in the case when $f(t)=0$ :
|
||||||
|
1) $ay''+b'y+cy=0$
|
||||||
|
then $ar^2+br+c=0$ and solve with quadratic formula
|
||||||
|
general solution is: $y_{h}(t)=c_{1}e^{r_{1}(t)}+c_{2}e^{r_{2}t}$ where h means homogenous, ( because when =0 its homogenous)
|
||||||
|
|
||||||
|
if $r_{1}=r_{2}$ then $y_{h}(t)=c_{1}e^{r(t)}+c_{2}e^{rt}$
|
||||||
|
if imaginary roots:
|
||||||
|
$y_{h}(t)=e^{\alpha t}(c_{1}\cos(\beta t)+c_{2}\sin(\beta t))$
|
||||||
|
2) If $y_{p}(t)$ solves 1) then its general solution is $y(t)=y_{h}(t)+y_{p}(t)$
|
||||||
|
theorem: if $p(t),\ g(t),\ f(t)$ are continuous on $I$ then the IVP $y''+p(t)y'+q(t)y=f(t), y(t_{o}),\ y'(t_{o})=y_{1} t_{o}\in I$ has a unique solution
|
||||||
|
method of undetermined coeffecients:
|
||||||
|
#ex
|
||||||
|
$y''\pm_{4}y'+4y=3t+9$ lets find general solution, its centainly non homogenous.
|
||||||
|
first we have to find general solution to the homogenous equation:
|
||||||
|
1) $y''-4y'+4y=0$
|
||||||
|
characteristic eq: $r^2-4r+4=0$ what are the roots?
|
||||||
|
$r=2$ (repeated solution)
|
||||||
|
$y_{h}(t)=c_{1}e^{2t}+c_{2}te^{2t}$
|
||||||
|
we are looking for a particular polynomial where the power is not greater than 1 (?)
|
||||||
|
2) $y_{p}(t)=At+B$
|
||||||
|
$y_{p}'=A,\ y_{p}''=0$
|
||||||
|
$-4A+4(At+B)=3t+9$
|
||||||
|
$4A=3,\ -4A+4B=9$
|
||||||
|
$A=\frac{3}{4},\ B=3$
|
||||||
|
$y(t)=\frac{3}{4}t+3$
|
||||||
|
general solution: $$y(t)=c_{1}e^{2t}+c_{2}te^{2t}+\frac{3}{4}t+3$$
|
||||||
|
so big takeaway is if the RHS of eq is a polynomial of degree u, we try to find a solution as a polynomial of degree u
|
||||||
|
|
||||||
|
#ex
|
||||||
|
$$y''-4y'+4y=e^{2t}$$
|
||||||
|
find general solution.
|
||||||
|
1) $y_h(t)=c_{1}e^{2t}+c_{2}te^{2t}$ (computed earlier)
|
||||||
|
2) $y_p(t)$
|
||||||
|
we observe the RHS is some exponential, we need the derivative + its second derivative to equal that, we have no option but suspect that its $Ae^{2t}$
|
||||||
|
but then the LHS becomes 0!
|
||||||
|
so $Ae^{2t}$ is a wrong guess.
|
||||||
|
so what do we do? try $Ate^{2t}$ take $c_{2}=A, c_{1}=0$, this does not work again. LHS becomes 0 again
|
||||||
|
so try $At^2e^{2t}$
|
||||||
|
$2Ae^{2t}=2e^{2t},\ A=1$ This one works!
|
||||||
|
we know the homogeenous solution.
|
||||||
|
$y(t)=c_{1}e^{2t}+c_{2}te^{2t}+t^2e^{2t}$ is the general solution
|
||||||
|
moral of sotry? if RHS is constant times $e^2t$ we guess with an exponent with a constant, if its homogenous we multiply by t, if still not a valid solution then we multiply by t again.
|
||||||
|
Ex:
|
||||||
|
$y''+2y'+2y=2e^{-t}+\cos t,\ y(0)=3,\ y'(0)=1$ I wanna solve this IVP! it must have a unique solution.
|
||||||
|
1) set RHS to 0: $r^2+2r+2=0$
|
||||||
|
$r_{1,2}=-1\pm i$ sqrt(i) is interesting, but not the topic for today.
|
||||||
|
$y_{h}(t)=e^{-t}(c_{1}\cos(t)+c_{2}\sin(t))$
|
||||||
|
2) $y_{p}(t)=$
|
||||||
|
RHS is much more complicated, sum of 2 functions. Lets use principle of super position
|
||||||
|
$y_{p}(t)=y_{p_{1}}+y_{p_{2}}$
|
||||||
|
where $y_{p_{1}}$ solves $y''+2y'+2y=2e^{-t}$
|
||||||
|
$y_{p_{2}}$ solves $y''+2y'+2y=5\cos (t)$
|
||||||
|
lets try $y_{p_{1}}=Ae^{-t}$ does this work? look at it, A must be zero but if A is zero you still get problems.
|
||||||
|
$y_{p_{1}}'=-Ae^{-t}$
|
||||||
|
$y_{p_{1}}''=Ae^-t$ plug in these three and we find that A=2
|
||||||
|
|
||||||
|
second equation, not so easy:
|
||||||
|
solution of cos t doenst quite work
|
||||||
|
$y_{p_{2}}=A\cos(t)+B\sin(t)$
|
||||||
|
$y_{p_{2}}'=-A\sin(t)+b\cos (t)$
|
||||||
|
$y_{p_{2}}''=-A\cos t-B\sin t$
|
||||||
|
$(A+2B)\cos(t)+(-2A+B)\sin(t)=5\cos(t)$
|
||||||
|
$A+2B=0$
|
||||||
|
$-2A+B=0$ -> A=1, B=2
|
||||||
|
but $y_{p_{1}}\ne y_{p_{2}}$ because of the $e^{-t}$ term
|
||||||
|
$y(t)=c_{1}e^{-t}\cos(t)+c_{2}e^{-t}\sin t+2e^{-t}+\cos t+2\sin t$
|
||||||
|
$y(0)=3=c_{1}+3=3\implies c_{1}=0$
|
||||||
|
$y'(0)=1=c_{2}$
|
||||||
|
final solution $y(t)=e^{-t}(\sin t+2)+\cos t+2\sin t$
|
||||||
|
|
||||||
|
If we have an equation of the from:
|
||||||
|
1) $ay''+by'+cy=P_{m}(t)e^{rt}$
|
||||||
|
where $p_{m}(t)=a_{m}t^m+a_{m-1}t^{m-1}+ \dots +a_{0}$
|
||||||
|
then the guess is: $y_{p}(t)=t^s(b_{mt}t^m+b_{m-1}t^{m-1}+\dots+b_{0})e^{rt}$
|
||||||
|
(i) s=0 if r is not a characteristic polynomial
|
||||||
|
(ii)) s=1 if r is a single root
|
||||||
|
(iii) s=2 if r is a double root
|
||||||
|
we will talk about this more in the coming lecture.
|
||||||
|
#end of lec 8
|
|
@ -0,0 +1,188 @@
|
||||||
|
most of these "models" in EE are based on these DE. You'll see how important DE are in chemical, electrical, mechanical, engphys, civil (very important for civil!), (mining? idk what's in mining :D -prof)
|
||||||
|
*DE are important* -prof
|
||||||
|
## Second order linear equations
|
||||||
|
Second order equations arise from very simple problems many engineers face, for instance a pendulum can be described by a second order equation.
|
||||||
|
#second_order
|
||||||
|
### $$a_{2}(t)y''+a_{1}(t)y'+a_{0}(t)y=f(t)$$
|
||||||
|
To motivate our interest: #fix
|
||||||
|
![[Drawing 2023-09-15 13.32.48.excalidraw]]
|
||||||
|
$ma=my''=-by'-ky$
|
||||||
|
Look how a second order equation describes the motion of a mass-spring system!
|
||||||
|
> Circuits that contains resistors, capacitors and inductors also behaves with this equation as well if you ignore the external magnetic fields around the circuit.
|
||||||
|
|
||||||
|
The equation $my''+by'+ky=0$ is a homogenous second order equation. (in this case, it's full name is homogenous second order linear equation with constant coefficients.)
|
||||||
|
>Similar pattern with the electrical circuit analogy. This DE ignores external forces on the mass-spring system, it only considers the friction and the spring. If we push the mass then there would be an external force.
|
||||||
|
|
||||||
|
It's called second order because we have second derivative in the equation.
|
||||||
|
|
||||||
|
|
||||||
|
#ex #second_order
|
||||||
|
### $$y''-4y'+3y=0$$
|
||||||
|
(This is obviously homogenous as stated by prof, although I don't understand why that is.)
|
||||||
|
Imagine there's no y' (meaning no friction) you kind want the derivates to equal itself, an exponential!
|
||||||
|
We guess the solution is of the form $y(t)=e^{rt}$
|
||||||
|
$y(t)=e^{rt}$
|
||||||
|
$y'=re^{rt}$
|
||||||
|
$y''=r^2e^{rt}$
|
||||||
|
$r^2e^{rt}-4re^{rt}+3e^{rt}=0$ <- Our guess worked!
|
||||||
|
$r^2-4r+3=0$
|
||||||
|
$ar^2+br+c=0$
|
||||||
|
$r_{1,2}=\frac{{-b\pm \sqrt{ b^2-4ac }}}{2a}$
|
||||||
|
so $r_{1,2}=1,3$
|
||||||
|
so two possibilities of the equation:
|
||||||
|
$y_{1}(t)=e^t$ or $y_{2}(t)=e^{3t}$
|
||||||
|
so the general solution is the sum of the two possibilities (But why? See principle of super position below.)
|
||||||
|
$$y(t)=c_{1}e^{t}+c_{2}e^{3t}$$
|
||||||
|
and we're done.
|
||||||
|
|
||||||
|
---
|
||||||
|
#end of lec 5 #start of lec 6
|
||||||
|
|
||||||
|
#ex #IVP #second_order Same equation from last lecture, but now an IVP:
|
||||||
|
|
||||||
|
$$y(t)=c_{1}e^{t}+c_{2}e^{3t} \quad c_{1},c_{2}\in\mathbb{R} \quad\text{let } y(0)=0,\ y'(0)=4\quad \text{ What is } c_{1}, c_{2}?$$
|
||||||
|
> Lemma: $y'(t)=c_{1}y_{1}+c_{2}y_{2}$
|
||||||
|
> proof: let $y_{1}=e^{r_{1}t}\qquad y_{2}=e^{r_{2}t}$
|
||||||
|
> $y(t)=c_{1}e^t+c_{2}e^{3t}$
|
||||||
|
> $y'(t)=c_{1}r_{1}e^{r_{1}t}+r_{2}c_{2}e^{r_{2}t}$
|
||||||
|
> $y'(t)=c_{1}r_{1}e^{r_{1}t}+c_{2}r_{2}e^{r_{2}t}$
|
||||||
|
> since $c_{1}r_{1}$ is just a product of two arbitrary constants, we can replace them with a new constant.
|
||||||
|
> $y'(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$
|
||||||
|
> $y'(t)=c_{1}y_{1}+c_{2}y_{2} \quad \Box$
|
||||||
|
|
||||||
|
We are given $y(0)=0$
|
||||||
|
$c_{1}e^0+c_{2}e^{3*0}=0$
|
||||||
|
$c_{1}+c_{2}=0$
|
||||||
|
We are also given $y'(0)=4$
|
||||||
|
$c_{1}+3c_{2}=4$
|
||||||
|
|
||||||
|
Solving the linear system of equations gives: $c_{1}=-2,\ c_{2}=2$ which gives the solution:
|
||||||
|
$$y'(t)=-2e^t+2e^{3t}$$
|
||||||
|
|
||||||
|
---
|
||||||
|
Remember from the example above where I said the "general solution is the sum of the two possibilities"? Let's explore and see why that is:
|
||||||
|
Recap: suppose we have an equation of the form $ay''+by'+cy=0$
|
||||||
|
$y(t)=e^{rt}$
|
||||||
|
then $ar^2+br+c=0$
|
||||||
|
case i) $r_{1},r_{2}=\frac{{-b\pm \sqrt{ b^2-4ac }}}{2a}, {r_{1}}\ne r_{2}$
|
||||||
|
$y_{1}(t)=e^{r_{1}t}\qquad y_{2}(t)=e^{r_{2}t}$
|
||||||
|
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$ is also a solution. But why? Principle of super position.
|
||||||
|
## Principle of super position:
|
||||||
|
If $y_{1}(t)$ solves $ay''+by'+cy=f_{1}(t)$
|
||||||
|
and $y_{2}(t)$ solves $ay''+by'+cy=f_{2}(t)$ on an interval $I$.
|
||||||
|
Then the following function that is a combination: $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
|
||||||
|
solves $ay''+by'+cy=c_{1}f_{1}(t)+c_{2}f_{2}(t)$
|
||||||
|
Now we prove it:
|
||||||
|
Plugging in $y=c_{1}y_{1}(t)+c_{2}y_{2}(t)$ into $ay''+by'+cy=c_{1}f_{1}(t)+c_{2}f_{2}(t)$ gives us:
|
||||||
|
$a(c_1y_{1}''+c_{2}y_{2}'')+b(c_1y_{1}'+c_{2}y_{2}')+c(c_1y_{1}+c_{2}y_{2})=c_{1}f_{1}(t)+c_{2}f_{2}(t)$
|
||||||
|
moving terms gives us: $c_{1}(ay_{1}''+by_{1}'+cy_{1})+c_{2}(ay_{2}''+by_{2}'+cy_{2})=c_{1}f_{1}(t)+c_{2}f_{2}(t) \quad \Box$
|
||||||
|
|
||||||
|
Okay but none of that makes sense, how do we use the proof?
|
||||||
|
Let the following:
|
||||||
|
$y_{1}(t)=e^{r_{1}t}$ solves $ay''+by'+cy=0$
|
||||||
|
$y_2(t)=e^{r_{2}t}$ solves $ay''+by'+cy=0$
|
||||||
|
$f_{1}(t)=f_{2}(t)=0$
|
||||||
|
This following can be concluded:
|
||||||
|
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$ must solve $ay''+by'+cy=0$ by principle of super position.
|
||||||
|
> Yay! Note this is only true when $f_{1}(t)=f_{2}(t)=0$ aka your RHS in the second order equation must be 0.
|
||||||
|
|
||||||
|
case ii) $r_{1}=r_{2}=\frac{-b}{2a}$ if $b^2-4ac=0$
|
||||||
|
if we assume $y_{1}=e^{r_{1}t}, y_{2}=e^{r_{1}t}$ like before then we get:
|
||||||
|
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{1}t}=ce^{r_{1}t}$ <- this doesn't seem like it works! We need two integration constants for a second order equation.
|
||||||
|
$y_{1}(t)=e^{-bt/2a}, y_{2}(t)=te^{-bt/2a}$ for time being we take this as true, we can prove it later.
|
||||||
|
$y(t)=c_{1}e^{-\frac{bt}{2a}}+c_{2}te^{-\frac{bt}{2a}}$
|
||||||
|
we can check later at home, but also, how was the idea for this found? He will tell us later.
|
||||||
|
|
||||||
|
### linear algebra 101: linear independence makes unit vectors, which forms a basis.
|
||||||
|
definition: if $y_{1}, y_{2}$ are solutions to $a(t)y''+b(t)y+c(t)=0$ on some interval $I_{1}$
|
||||||
|
then they are called linearly independent if none of them is a constant multiple of the other.
|
||||||
|
Theorem: If $y_{1}(t), y_{2}(t)$ are linearly independent solutions to $ay''+by'+cy=0$ then any other solution can be written as $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
|
||||||
|
|
||||||
|
how do we know the two solutions are linearly independent? Test for linear independence:
|
||||||
|
$y_{1}, y_{2}$ are solutions to $a(t)y''+b(t)y+c(t)y=0$ on some interval $I_{1}$
|
||||||
|
then they are called linearly independent iff
|
||||||
|
$W(y_{1},y_{2})(t)=\det \begin{pmatrix}y_{1} & y_{2} \\y_{1}' & y_{2}'\end{pmatrix}\ne 0$
|
||||||
|
(i) $b^2-4ac>0 \Rightarrow r_{1}\ne r_{2}$
|
||||||
|
$y_{1}=e^{r_{1}t}, y_{2}=e^{r_{2}}t$
|
||||||
|
$W(y_{1},y_{2})=\det\begin{pmatrix}e^{r_{1}t} & e^{r_{2}t} \\r_{1}e^{r_{1}t} & r_{2}e^{r_{2}t}\end{pmatrix}$
|
||||||
|
$=e^{t(r_{1}+r_{2})}(r_{2}-r_{1})\ne 0$
|
||||||
|
(ii) $b^2-4ac=0\Rightarrow$
|
||||||
|
$r_{1}=r_{2}=-\frac{b}{2a}=r$
|
||||||
|
$y_{1}(t)=e^{rt}, y_{2}(t)=te^{rt}$
|
||||||
|
$W(y_{1},y_{2})=\det\begin{pmatrix}e^{rt} & te^{rt} \\re^{rt} & e^{rt}(1+rt)\end{pmatrix}$
|
||||||
|
$=e^{2rt}(1+rt)-rte^{rt}e^{2rt}$
|
||||||
|
$=e^{2rt}\ne 0$
|
||||||
|
|
||||||
|
|
||||||
|
#ex #IVP #second_order
|
||||||
|
$$y''-2y'+y=0, y(0)=1, y'(0)=0$$
|
||||||
|
|
||||||
|
$e^{rt}(\underset{ = }{ r^2-2r+1 })=0$
|
||||||
|
$(r-1)^2=0\Rightarrow r_{1}=r_{2}=1$
|
||||||
|
$y(t)=c_{1}e^t+c_{2}te^t$
|
||||||
|
$y(0)=c_{1}=1$
|
||||||
|
$y(t)=e^t+c_{2}te^t$
|
||||||
|
$y'(0)=0=1+c_{2}\Rightarrow c_{2}=1$
|
||||||
|
$$y(t)=e^t-te^t$$
|
||||||
|
Wow, that was a lot today, my notes look like a mess. I'll have to clean this up and understand what's going on later.
|
||||||
|
#end of lecture 6
|
||||||
|
|
||||||
|
|
||||||
|
#start of lecture 7 (sept 20)
|
||||||
|
from last class: if $r_{1}=r_{2}=-\frac{b}{2a}=r$
|
||||||
|
$y_{1}=e^{rt}, \quad y_{2}=te^{rt}$
|
||||||
|
general solution:
|
||||||
|
$$y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$$
|
||||||
|
however there's a third option:
|
||||||
|
$b^2-4ac<0$
|
||||||
|
then we have complex roots
|
||||||
|
$r_{1,2}=-\frac{b}{2a}\pm\frac{i\sqrt{ 4ac-b^2 }}{2a}=\alpha+i\beta$ <- Complex conjugates. And due to fundamental theorem of algebra, there are only 2 roots.
|
||||||
|
|
||||||
|
$e^{r_{1}t}=e^{(\alpha+i\beta)t}=e^{\alpha t}+e^{i\beta t}$
|
||||||
|
side note: there are no numbers that are more than two components that are "useful", even quaternions
|
||||||
|
$e^{i\beta t}=e^{i\theta}$
|
||||||
|
expand into power series:
|
||||||
|
$=1+\frac{i\theta}{1!}+\frac{{(i\theta)^2}}{2!}=\frac{{(i\theta)^3}}{3!}\dots$
|
||||||
|
$=1+\frac{i\theta}{1!}-\frac{\theta^2}{2!}-\frac{i\theta^3}{3!}+\frac{\theta^4}{4!}+\frac{i\theta^5}{5!}+\dots$
|
||||||
|
$=\left( 1-\frac{\theta^2}{2!}+\frac{\theta^4}{4!}-\dots \right)+i\left( \frac{\theta}{1!}-\frac{\theta^3}{2!}+\frac{\theta^5}{3!}\dots\right)$
|
||||||
|
$e^{i\theta}=\cos(\theta)+i\sin(\theta) \quad \Box$ We have proven the Euler formula
|
||||||
|
|
||||||
|
$y(t)=e^{rt}=e^{\alpha t}(\cos \beta t+i\sin \beta t)$
|
||||||
|
Lemma: If $u(t)+iv(t)$ solves $ay''+by'+cy=0$ then $u(t),\ v(t)$ are also solutions.
|
||||||
|
Proof:
|
||||||
|
$a(u+iv)''+b(u+iv)'+c(u+iv)=0$
|
||||||
|
$\underbrace{ { (au''+bu'+cu) } }_{ =0 }+i\underbrace{ (av''+bv'+cv) }_{ =0 }=0$
|
||||||
|
$y_{1}(t)=e^{\alpha t}\cos(\beta t),\ y_{2}(t)=e^{\alpha t}\sin(\beta t)$
|
||||||
|
$\alpha=-\frac{b}{2a},\quad \beta={\frac{\sqrt{ 4ac-b^2 }}{2a}}$
|
||||||
|
$y(t)=c_{1}y_{1}+c_{2}y_{2}$
|
||||||
|
now we have to test the two solutions are linearly independent
|
||||||
|
$W[y_{1},y_{2}]=\det\begin{pmatrix}y_{1} & y_{2} \\ y_{1}' & y_{2}'\end{pmatrix}\ne0$ <- remember to do/show this at home
|
||||||
|
|
||||||
|
#ex #IVP
|
||||||
|
$$y''-2y'+5y=0 \quad y(0)=0 \quad y'(0)=2$$
|
||||||
|
$r^2-2r+5=0$<-characteristic equation
|
||||||
|
$r_{1,2}={1\pm \frac{\sqrt{ -4b }}{2}}=1\pm2i$
|
||||||
|
$y_{1}=e^t\cos(2t)$ $y_{2}=e^t\sin(2t)$
|
||||||
|
general solution: $y(t)=e^{\alpha t}(c_{1}\cancel{ \cos 2 t }+c_{2}\sin 2 t)$
|
||||||
|
$y(0)=0=c_{1}$
|
||||||
|
$y'(0)=c_{2}(e^t)$
|
||||||
|
*I missed stuff here that he erased*
|
||||||
|
general solution is:
|
||||||
|
$$y(t)=e^t\sin(2t)$$
|
||||||
|
it has a nice graph, where if it was a circuit it would blow up
|
||||||
|
or if it was a bridge it would collapse
|
||||||
|
|
||||||
|
## Something more difficult now:
|
||||||
|
$ay''+by'+cy=f(t)$ Again, a mass-spring system without any external force.
|
||||||
|
if f(t)=0 we can find the solution easily and use superposition to get the general solution
|
||||||
|
$ay''+by'+cy=0$
|
||||||
|
-> general solution is $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
|
||||||
|
|
||||||
|
If we can find just one solution in $ay''+by'+cy=f(t)$
|
||||||
|
let it be $y_{p}(t)$
|
||||||
|
then the sum of the solutions
|
||||||
|
$y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)+y_{p}(t)$ must solve $ay''+by'+cy=f(t)$
|
||||||
|
|
||||||
|
Theorem: If $a(t),\ b(t),\ c(t)$ are continuous on $I$ , then IVP: $a(t)y''+b(t)y'+c(t)y=f(t)$ ; $y(t_{o})=y_{o}$ \ , $y'(t_{o})=y_{1}$ has a unique solution.
|
||||||
|
we will do the proofs next class.
|
||||||
|
#end of lecture 7
|
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
#start of lecture 1
|
||||||
|
# Intro (Newton example):
|
||||||
|
The prof decided to open with a real-world problem where we find the equations that describe a falling object using differential equations (DE's):
|
||||||
|
We know $F=ma$
|
||||||
|
$F=m\frac{dv}{dt}=mg-kv$ <- we account for air resistance here. We can approximate that the force of air resistance is proportional to the speed times a constant k.
|
||||||
|
We can rearrange and solve it as it is a separable DE:
|
||||||
|
$\frac{dv}{mg-kv}=\frac{dt}{m}$
|
||||||
|
integrating both sides:
|
||||||
|
$\int \frac{dv}{mg-kv}=\frac{t}{m}+C$
|
||||||
|
let $u=mg-kv \quad du=-kdv$
|
||||||
|
$\int \frac{dv}{mg-kv}=\int \frac{du}{-k*u}=\frac{1}{-k}\ln\mid mg-kv\mid=\frac{t}{m}+C$
|
||||||
|
Very cool, but I want the velocity as a function of time, isolate v
|
||||||
|
$\ln\mid mg-kv\mid=-\frac{kt}{m}+C$
|
||||||
|
$\mid mg-kv\mid=e^{\frac{-kt}{m}+C}=e^{\frac{-kt}{m}}e^C$
|
||||||
|
$e^C$ is a + constant, the absolute value will multiply the inside expression by -1 when the inside is negative, so we can replace the $e^C$ constant with an arbitrary constant A that can be + or -
|
||||||
|
$mg-kv=Ae^{\frac{-kt}{m}}$
|
||||||
|
so, the general solution is $$v(t)=\frac{1}{k}(mg-Ae^{\frac{-kt}{m}})$$
|
||||||
|
|
||||||
|
## Separable DE:
|
||||||
|
$$\frac{dy}{dx}=f(y)g(x) \rightarrow \frac{dy}{f(y)}=g(x)dx\quad where\quad f(y)\ne0$$
|
||||||
|
>Since these are so similar, I'm calling these two #de_s_type1 Note that $\frac{1}{f(y)}$ is still an arbitrary function of y. So you could also say: $k(y)dy=g(x)dx$ is a separable equation.
|
||||||
|
|
||||||
|
#ex #de_s_type1
|
||||||
|
$$\frac{dy}{dt}=\frac{1-t^2}{y^2}$$
|
||||||
|
$y^2dy=dt(1-t^2)$
|
||||||
|
integrating both sides yields:
|
||||||
|
$\frac{y^3}{3}=t-\frac{t^3}{3}+C$
|
||||||
|
finally we get:
|
||||||
|
$$y=(3t-t^3+C)^\frac{1}{3}$$
|
||||||
|
|
||||||
|
## Initial value problem (IVP):
|
||||||
|
A Differential equation with provided initial conditions.
|
||||||
|
|
||||||
|
#ex #IVP #de_s_type1
|
||||||
|
$$\frac{dy}{dx}=2x\cos^2(y), \quad y(0)=\frac{\pi}{4}$$
|
||||||
|
$\frac{dy}{\cos^2(y)}=2xdx$
|
||||||
|
integrate both sides yields:
|
||||||
|
$\int \frac{dy}{\cos^2(y)}=\tan(y)+C=x^2$
|
||||||
|
plug in $y(0)=\frac{\pi}{4}$
|
||||||
|
$\tan\left( \frac{\pi}{4} \right)+C=0$
|
||||||
|
$1+C=0$
|
||||||
|
$C=-1$
|
||||||
|
So, the answer is:
|
||||||
|
$$y=\arctan(x^2+1)$$
|
||||||
|
|
||||||
|
#end of Lecture 1
|
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
"nodes":[
|
||||||
|
{"id":"767241b95828457e","type":"text","text":"Integrate both sides","x":-57,"y":-360,"width":352,"height":80},
|
||||||
|
{"id":"3572d3ccf3a666dc","type":"text","text":"# Solution","x":-43,"y":-520,"width":325,"height":90},
|
||||||
|
{"id":"ac4eb08e6ceeccbd","type":"text","text":"# How to solve (almost) any differential equation:","x":-561,"y":-760,"width":1296,"height":136},
|
||||||
|
{"id":"76786ab85409e204","type":"text","text":"updated Sept 20","x":778,"y":-729,"width":301,"height":74},
|
||||||
|
{"id":"c6a536ee57248cfd","type":"file","file":"Math 201/Lectures/Separable equations (lec 1).md","x":-102,"y":-170,"width":441,"height":140},
|
||||||
|
{"id":"df03f8f1000d374a","type":"text","text":"If $y'=G(ax+by)$ \n\nsubstitute u=ax+by\n$\\frac{du}{dx}=a+b\\frac{ dy }{ dx}$","x":-251,"y":121,"width":341,"height":165},
|
||||||
|
{"id":"1044e4c2c0610a1e","type":"text","text":"if $y'=G\\left( \\frac{y}{x} \\right)$ \n\nsubstitute $u=\\frac{y}{x}$\n$\\frac{dy}{dx}=u+x{\\frac{du}{dx}}$","x":150,"y":121,"width":315,"height":165},
|
||||||
|
{"id":"c280d80abc2ea256","type":"file","file":"Math 201/Lectures/Homogenous equations (lec 2).md","x":-91,"y":380,"width":441,"height":149},
|
||||||
|
{"id":"ffbe5ed5493f9419","type":"text","text":"find $\\mu(x)$","x":-561,"y":156,"width":250,"height":60},
|
||||||
|
{"id":"78362e72fb0d54af","type":"file","file":"Math 201/Lectures/Linear equations (lec 2-3).md","x":-777,"y":323,"width":466,"height":170},
|
||||||
|
{"id":"e71a5b824ac543f8","type":"text","text":"combine terms using product rule","x":-590,"y":-30,"width":309,"height":103},
|
||||||
|
{"id":"70316d4131dc52c3","type":"file","file":"Math 201/Lectures/Bernoulli equations (lec 3).md","x":-884,"y":973,"width":465,"height":136},
|
||||||
|
{"id":"e70d1e3eea85e227","type":"text","text":"substitute","x":-669,"y":601,"width":250,"height":60},
|
||||||
|
{"id":"ba7ff8f24112635b","type":"text","text":"$\\frac{d}{dx}(y^{1-n}=u)$","x":-669,"y":709,"width":250,"height":60},
|
||||||
|
{"id":"f42f6dfefb957902","type":"text","text":"let $y^{1-n}=u$","x":-669,"y":811,"width":250,"height":60},
|
||||||
|
{"id":"5263b3c4f5b28ec6","type":"text","text":"Shortcut: $$y(x)=\\frac{1}{I(x)}\\int I(x)Q(x) \\, dx $$","x":-1006,"y":-37,"width":355,"height":193},
|
||||||
|
{"id":"109d20a863d93116","type":"text","text":"Solve system of linear equations","x":-28,"y":601,"width":316,"height":96},
|
||||||
|
{"id":"ece672db8e16ac5a","type":"text","text":"substitute $x=u+k$\n$y=v+l$","x":9,"y":769,"width":242,"height":156},
|
||||||
|
{"id":"120b3008bd08d69a","type":"file","file":"Math 201/Lectures/Linear coefficient equations (lec 4).md","x":-81,"y":1035,"width":422,"height":143},
|
||||||
|
{"id":"bebd67e847df16e1","type":"text","text":"Shortcut:\n$$I(x)=e^{\\int (1-n)P(x) \\, dx }$$\n$$y^{1-n}=\\frac{1}{I(x)}\\left( \\int (1-n)I(x)Q(x) \\, dx +C\\right)$$","x":-1333,"y":-430,"width":505,"height":260},
|
||||||
|
{"id":"3f081acda4f30a27","type":"text","text":"solve for $r_{1}$ & $r_{2}$ using quadratic formula","x":1315,"y":183,"width":274,"height":125},
|
||||||
|
{"id":"4ffaa5c9a7e8d22b","type":"text","text":"use principle of super position","x":1329,"y":29,"width":245,"height":96},
|
||||||
|
{"id":"cd7490f8cce0b6e0","type":"file","file":"Math 201/Lectures/Second order linear equations (lec 5-7).md","x":1215,"y":780,"width":474,"height":145},
|
||||||
|
{"id":"cd31ca74652b6936","type":"text","text":"substitute $y(t)=e^{rt}$ and its derivatives in the equation","x":1293,"y":556,"width":317,"height":122},
|
||||||
|
{"id":"e063ab92aef817e4","type":"text","text":"divide both sides of equation by $e^{rt}$","x":1322,"y":382,"width":260,"height":110},
|
||||||
|
{"id":"d98da52cb7139c25","type":"text","text":"$N(x,y)=\\frac{\\partial}{\\partial y} \\int M \\, dx+g(y)$\n","x":514,"y":354,"width":328,"height":77},
|
||||||
|
{"id":"ba1ef733f104894d","type":"text","text":"$M(x,y)=\\frac{\\partial}{\\partial x} \\int N \\, dy+g(x)$\n","x":875,"y":354,"width":340,"height":77},
|
||||||
|
{"id":"3cc6d2966364d19c","type":"text","text":"$F(x,y)=\\int M \\, dx+g(y)$","x":520,"y":497,"width":315,"height":94},
|
||||||
|
{"id":"a662aed47cf28581","type":"text","text":"$F(x,y)=\\int N \\, dy+g(x)$","x":894,"y":497,"width":302,"height":94},
|
||||||
|
{"id":"5dc72ba2fdd9b5af","type":"text","text":"solve for $g$","x":735,"y":177,"width":250,"height":60},
|
||||||
|
{"id":"dc3f64df05e215d4","type":"text","text":"use $F(x,y)=C$ and the $F(x,y)$ you got from the integral to obtain the general solution","x":665,"y":-83,"width":390,"height":180},
|
||||||
|
{"id":"90a401b5afaf25e6","type":"text","text":"Test for exactness:\n$\\frac{\\partial M}{\\partial y}=\\frac{\\partial N}{\\partial x}$","x":732,"y":697,"width":277,"height":102},
|
||||||
|
{"id":"d172c6ad7421b458","type":"file","file":"Math 201/Lectures/Exact equations (lec 4-5).md","x":674,"y":903,"width":393,"height":133},
|
||||||
|
{"id":"d3ffeeccd9e88489","type":"text","text":"$M(x,y)dx+N(x,y)dy=0$","x":674,"y":1036,"width":342,"height":83},
|
||||||
|
{"id":"937768cc91c15daa","type":"text","text":"$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0$","x":-81,"y":1178,"width":516,"height":63},
|
||||||
|
{"id":"59f62d39b48e7b57","x":1663,"y":-306,"width":250,"height":60,"type":"text","text":"under-damped"},
|
||||||
|
{"id":"7089887c01722e83","x":1880,"y":-173,"width":250,"height":60,"type":"text","text":"over-damped"},
|
||||||
|
{"id":"b3e73030feee12da","x":1843,"y":33,"width":287,"height":50,"type":"text","text":"critically-damped"}
|
||||||
|
],
|
||||||
|
"edges":[
|
||||||
|
{"id":"7f7a9f03d9ef74ef","fromNode":"c6a536ee57248cfd","fromSide":"top","toNode":"767241b95828457e","toSide":"bottom"},
|
||||||
|
{"id":"eb189cf0bae0ff74","fromNode":"767241b95828457e","fromSide":"top","toNode":"3572d3ccf3a666dc","toSide":"bottom"},
|
||||||
|
{"id":"e78d22577d8aaefd","fromNode":"c280d80abc2ea256","fromSide":"top","toNode":"1044e4c2c0610a1e","toSide":"bottom"},
|
||||||
|
{"id":"91f77149289c989b","fromNode":"1044e4c2c0610a1e","fromSide":"top","toNode":"c6a536ee57248cfd","toSide":"bottom"},
|
||||||
|
{"id":"48ecc47cc360584a","fromNode":"109d20a863d93116","fromSide":"top","toNode":"c280d80abc2ea256","toSide":"bottom"},
|
||||||
|
{"id":"c33cf1589a1be354","fromNode":"78362e72fb0d54af","fromSide":"top","toNode":"ffbe5ed5493f9419","toSide":"bottom"},
|
||||||
|
{"id":"427e1da1bd931c17","fromNode":"ffbe5ed5493f9419","fromSide":"top","toNode":"e71a5b824ac543f8","toSide":"bottom"},
|
||||||
|
{"id":"711bf866628f9ae7","fromNode":"78362e72fb0d54af","fromSide":"top","toNode":"5263b3c4f5b28ec6","toSide":"bottom"},
|
||||||
|
{"id":"12a51353c04f3a6e","fromNode":"70316d4131dc52c3","fromSide":"top","toNode":"f42f6dfefb957902","toSide":"bottom"},
|
||||||
|
{"id":"9a3b2bfa92b2a958","fromNode":"f42f6dfefb957902","fromSide":"top","toNode":"ba7ff8f24112635b","toSide":"bottom"},
|
||||||
|
{"id":"65ae753100e1a028","fromNode":"ba7ff8f24112635b","fromSide":"top","toNode":"e70d1e3eea85e227","toSide":"bottom"},
|
||||||
|
{"id":"68a17b36a8f9823d","fromNode":"e70d1e3eea85e227","fromSide":"top","toNode":"78362e72fb0d54af","toSide":"bottom"},
|
||||||
|
{"id":"bbc151d3f261f179","fromNode":"5263b3c4f5b28ec6","fromSide":"top","toNode":"3572d3ccf3a666dc","toSide":"left"},
|
||||||
|
{"id":"473fd48634427ca8","fromNode":"a662aed47cf28581","fromSide":"top","toNode":"ba1ef733f104894d","toSide":"bottom"},
|
||||||
|
{"id":"c3fd9e04ae24009a","fromNode":"3cc6d2966364d19c","fromSide":"top","toNode":"d98da52cb7139c25","toSide":"bottom"},
|
||||||
|
{"id":"6f5e1fd90c03ff8e","fromNode":"cd7490f8cce0b6e0","fromSide":"top","toNode":"cd31ca74652b6936","toSide":"bottom"},
|
||||||
|
{"id":"256d32160fde6619","fromNode":"c280d80abc2ea256","fromSide":"top","toNode":"df03f8f1000d374a","toSide":"bottom"},
|
||||||
|
{"id":"06197d071305053e","fromNode":"df03f8f1000d374a","fromSide":"top","toNode":"c6a536ee57248cfd","toSide":"bottom"},
|
||||||
|
{"id":"2930b4b645b64fe6","fromNode":"e71a5b824ac543f8","fromSide":"top","toNode":"c6a536ee57248cfd","toSide":"left"},
|
||||||
|
{"id":"3b69d186f470909b","fromNode":"cd31ca74652b6936","fromSide":"top","toNode":"e063ab92aef817e4","toSide":"bottom"},
|
||||||
|
{"id":"f99e2001e302efe7","fromNode":"e063ab92aef817e4","fromSide":"top","toNode":"3f081acda4f30a27","toSide":"bottom"},
|
||||||
|
{"id":"5b2a75e3d7143938","fromNode":"4ffaa5c9a7e8d22b","fromSide":"top","toNode":"3572d3ccf3a666dc","toSide":"right"},
|
||||||
|
{"id":"499d02da2174d229","fromNode":"120b3008bd08d69a","fromSide":"top","toNode":"ece672db8e16ac5a","toSide":"bottom"},
|
||||||
|
{"id":"c71b296bcb5e22a4","fromNode":"ece672db8e16ac5a","fromSide":"top","toNode":"109d20a863d93116","toSide":"bottom"},
|
||||||
|
{"id":"c03033b857ed5370","fromNode":"d172c6ad7421b458","fromSide":"top","toNode":"90a401b5afaf25e6","toSide":"bottom"},
|
||||||
|
{"id":"a1ec7bb3ab65b0dd","fromNode":"90a401b5afaf25e6","fromSide":"top","toNode":"3cc6d2966364d19c","toSide":"bottom"},
|
||||||
|
{"id":"0f10794cffcd8720","fromNode":"90a401b5afaf25e6","fromSide":"top","toNode":"a662aed47cf28581","toSide":"bottom"},
|
||||||
|
{"id":"64cea137d4762a91","fromNode":"d98da52cb7139c25","fromSide":"top","toNode":"5dc72ba2fdd9b5af","toSide":"bottom"},
|
||||||
|
{"id":"bc954d168504507f","fromNode":"ba1ef733f104894d","fromSide":"top","toNode":"5dc72ba2fdd9b5af","toSide":"bottom"},
|
||||||
|
{"id":"85f3f204e5750054","fromNode":"5dc72ba2fdd9b5af","fromSide":"top","toNode":"dc3f64df05e215d4","toSide":"bottom"},
|
||||||
|
{"id":"87edf0438b210dcd","fromNode":"dc3f64df05e215d4","fromSide":"top","toNode":"3572d3ccf3a666dc","toSide":"right"},
|
||||||
|
{"id":"e54d4010a7ef62c8","fromNode":"bebd67e847df16e1","fromSide":"right","toNode":"3572d3ccf3a666dc","toSide":"left"},
|
||||||
|
{"id":"d24c3bef53a69a99","fromNode":"3f081acda4f30a27","fromSide":"top","toNode":"4ffaa5c9a7e8d22b","toSide":"bottom"},
|
||||||
|
{"id":"7a3e93142d63ca9f","fromNode":"70316d4131dc52c3","fromSide":"left","toNode":"bebd67e847df16e1","toSide":"bottom"}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Studocu
|
||||||
|
Worst website ever!!! (imo)
|
||||||
|
They make the students pay for course materials that they don't own, and guess where they get the course material? THE STUDENTS!! WTF. Probably facilitating infringing on the copyrights of professors, and yet they still make a profit on that! And I wouldn't be so upset about it if it were priced reasonably, but it's not; it's 83.88CAD for a year or 35.97CAD for 3 months.
|
||||||
|
</br>
|
||||||
|
Now, I know there's gonna be a bunch of pirates, I can already hear them smirking and pushing their glasses up: "Intellectual property is not real, copyright is not real, piracy is morally correct,..." I know what you mean. And sometimes I agree; I can justify in my mind pirating a copy of Adobe software or downloading an overly expensive text book. But sometimes it's not so clear-cut, and it's morally ambiguous. It's easy to be an advocate of piracy, but when you're on the receiving end, now it's not so nice, is it? And it's not so nice when people whose lives depend on the sales of their children's storybooks are unsure if they can pay their next rent. Meanwhile, a pirate is bragging to their face about how good their philosophy is. "Piracy helps distribute knowledge to people with low incomes; it allows anyone to have equal opportunity for education." You are absolutely correct. But how can you expect people to want to share their works when everyone is constantly a pirate?
|
||||||
|
Whatever viewpoint you have, the biggest idea I want to leave with you is: please don't be arrogant. I have been arrogant on this subject before. It's much more realistic to see the topic of piracy from both viewpoints.
|
|
@ -0,0 +1,17 @@
|
||||||
|
This is an incomplete list. I'm trying to add to it as I go.
|
||||||
|
|
||||||
|
everything with the #remember tag as well as the representations of the various DE, they start with #de_
|
||||||
|
|
||||||
|
Also remember the following:
|
||||||
|
## derivatives of trigs
|
||||||
|
$\frac{d}{dx}\tan(x)=sec^2(x)$
|
||||||
|
$\frac{d}{dx}sec(x)=sec(x)\tan(x)$
|
||||||
|
...
|
||||||
|
## integrals of trigs
|
||||||
|
$\int \tan(x) \, dx=\ln\mid \sec(x)\mid+C$
|
||||||
|
$\int sec(x) \, dx=\ln\mid sec(x)+\tan(x)\mid+C$
|
||||||
|
...
|
||||||
|
## integration by parts
|
||||||
|
LIATE -> log, inv trig, algebraic, trig, exp
|
||||||
|
set u to the first in the list above
|
||||||
|
$\int u(x)v'(x) \, dx=uv-\int u'(x)v(x) \, dx$
|
|
@ -0,0 +1,71 @@
|
||||||
|
#start of lec 9
|
||||||
|
1) $ay''+by'+cy=P_m(t)e^{rt}$
|
||||||
|
$y_{p}(t)=t^s(b_{m}t^m+b_{m-1}t^{m-1}+\dots+b_{0})e^{rt}$
|
||||||
|
s=0, if r is not a root
|
||||||
|
s=1 if r is a single root
|
||||||
|
s=2 if r is a double root
|
||||||
|
where P is a polynomial degree m.
|
||||||
|
|
||||||
|
2) $ay''+by'+cy=P_{m}(t)e^{\alpha t}\cos(\beta t)+P_{m}(t)e^{\alpha t}\sin(\beta t)$
|
||||||
|
3) $y_{p}(t)=t^s[(A_{k}t^k+A_{K-1}t^{k-1}+\dots+A_{0})e^{\alpha t}\cos(\beta t)+(B_{k}t^k+B_{k-1}t^{k-1}+\dots+B_{0})e^{\alpha t}\sin(\beta t)]$
|
||||||
|
s=0 if $\alpha+i\beta$ is not a root
|
||||||
|
s=1 if $\alpha+i\beta$ is a root
|
||||||
|
|
||||||
|
variation of parameters:
|
||||||
|
$ay''+by'+cy=f(t)$
|
||||||
|
1) $y_{h}=c_{1}y_{1}(t)+c_{2}y_{2}t$ <- h is homogenous, ie: $f(t)=0$
|
||||||
|
lagrange proposed: find a particular solution of y_p
|
||||||
|
$y_{p}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$ <- btw $y_{1}$ and $y_{2}$ are often called a fundamental pair.
|
||||||
|
we put y_p into the equation and make it equal to the RHS
|
||||||
|
$y'_{p}=v_{1}y_{1}+v_{1}y_{1}'+v_{2}'y_{2}+v_{2}y_{2}'$
|
||||||
|
to avoid second derivatives in the equation and problems with uniqueness lagrange imposed:
|
||||||
|
1) $v_{1}y_{1}+v_{2}'y_{2}=0$ this simplifies our work down the road as well.
|
||||||
|
so $y_{p}''=v_{1}'y_{1}'+v_{1}y_{1}''+v_{2}'y_{2}'+v_{2}y_{2}''$
|
||||||
|
$a(v_{1}'y_{1}'+v_{1}y_{1}''+v_{2}'y_{2}'+v_{2}y_{2}'')+b(v_{1}y_{1}'+v_{2}y_{2}')+c(v_{1}y_{1}+v_{2}y_{2})=f(t)$
|
||||||
|
$v_{1}(ay_{1}''+\cancelto{ 0 }{ by_{1}' }+cy_{1})+v_{2}(ay_{2}''+\cancelto{ 0 }{ by_{2}'C }+cy_{2})+a(v_{1}'y_{1}'+v_{2}'y_{2}')$
|
||||||
|
2) $v_{1}'y_{1}'+v_{2}'y_{2}'=\frac{f(t)}{a}$
|
||||||
|
$\det \begin{pmatrix}y_{1} & y_{2} \\y_{1}'& y_{2}'\end{pmatrix}$ = rronsky = $W[y_{1},y_{2}]\ne 0$ this can never be 0!
|
||||||
|
by definition $y_1$ and $y_2$ are linearly independant solutions so the above can never be 0!
|
||||||
|
$v_{1}'=\frac{{f(t)y_{2}t}}{aW[y_{1},y_{2}]}$; $v_{2}'=-\frac{{f(t)y_{1}(t)}}{aW[y_{1},y_{2}]}$ <- integrate both sizes to get v1,2. When integrating, you don't need to add a generic constant.
|
||||||
|
|
||||||
|
#ex #second_order #IVP
|
||||||
|
$y''+4y=2\tan(2t)-e^t \qquad y(0)=0 \qquad y'(0)=\frac{4}{5}$
|
||||||
|
can we use undetermined coefficients? yes and no
|
||||||
|
find general solution to homogenous countepart
|
||||||
|
1) $y''+4y=0$ -> $r^2+4=0$ -> $r_{1,2}=\pm 2i$
|
||||||
|
$y_{h}(t)=c_{1}\cos(2t)+c_{2}\sin(2t)$
|
||||||
|
2 $y''+4y=-e^t$ <- use method of undetermined coefficients
|
||||||
|
$y_{p}'(t)=Ae^{t}$
|
||||||
|
$5Ae^t=-e^t$
|
||||||
|
$A=-\frac{1}{5}$
|
||||||
|
$y_{p}'(t)=-\frac{1}{5}e^t$
|
||||||
|
(ii) $y''+4y=2\tan(2t)$ <- cant use method of undetermined coefficients
|
||||||
|
$y_{p}^2(t)=v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)$
|
||||||
|
plugging in:
|
||||||
|
we get a system of eq:
|
||||||
|
$\cos(2t)v_{1}'+\sin(2t)v_{2}'=0$
|
||||||
|
$-2\sin(2t)v_{1}'+2\cos(2t)v_{2}'=2\tan(2t)$
|
||||||
|
> we know these two will give a unique solution.
|
||||||
|
>to solve system of eq multiply each by:
|
||||||
|
>$2\cos(2t)$
|
||||||
|
>$\sin(2t)$
|
||||||
|
|
||||||
|
$2(\sin^2(2t)+\cos^2(2t))v_{2}'=2\tan(2t)\cos(2t)$
|
||||||
|
$v_{2}'=\sin(2t)$
|
||||||
|
$v_{2}(t)=-\frac{1}{2}\cos(2t)$ no constant of integration, we want one solution only
|
||||||
|
$v_{1}'=-{\frac{\sin^2(2t)}{\cos(2t)}}$
|
||||||
|
$v_{1}=-\int \frac{\sin^2(2t)}{\cos(2t)} \, dx$
|
||||||
|
$v_{1}=-\int \frac{{1-\cos^2(2t)}}{\cos(2t)} \, dt$
|
||||||
|
$v_1=-\int sec(2t) \, dx+\int \cos(2t) \, dt$
|
||||||
|
$v_{1}(t)=-\frac{1}{2}\ln\mid sec(2t)+\tan(2t)\mid+\frac{1}{2}\sin(2t)$
|
||||||
|
$y_{p}^2(t)=v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)$
|
||||||
|
$y(t)=y_{h}(t)+y_{p}'(t)+y_{p}^2(t)$
|
||||||
|
=$c_{1}\cos(2t)+c_{2}\sin(2t)+v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)-\frac{1}{5}e^t$
|
||||||
|
is our general answer.
|
||||||
|
|
||||||
|
IVP solution:
|
||||||
|
$y(0)=0=c_{1}-y_{p}(0)=c_{1}-\frac{1}{5}\Rightarrow c_{1}=\frac{1}{5}$
|
||||||
|
skipping some differentiation: $y'(0)=2c_{2}+y_{p}'(0)=2c_{2}+v_{1}'(0)+2v_{2}(0)-\frac{1}{5}=\frac{4}{5}\Rightarrow c_{2}=1$
|
||||||
|
$y(t)=\frac{1}{5}\cos(2t)+\sin(2t)-\frac{1}{5}e^t+v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)$
|
||||||
|
|
||||||
|
#end of lecture 9
|
|
@ -0,0 +1,17 @@
|
||||||
|
# This is the main index
|
||||||
|
I have written these notes for myself, I thought it would be cool to share them. These notes may be inaccurate, incomplete, or incoherent. No warranty is expressed or implied. Reader assumes all risk and liabilities.
|
||||||
|
</br>
|
||||||
|
[Separable equations (lec 1)](separable-equations-lec-1.html)
|
||||||
|
[Homogenous equations (lec 2)](homogenous-equations-lec-2.html)
|
||||||
|
[Linear equations (lec 2-3)](linear-equations-lec-2-3.html)
|
||||||
|
[Bernoulli equations (lec 3)](bernoulli-equations-lec-3.html)
|
||||||
|
[Linear coefficient equations (lec 4)](linear-coefficient-equations-lec-4.html)
|
||||||
|
[Exact equations (lec 4-5)](exact-equations-lec-4-5.html)
|
||||||
|
[Second order linear equations (lec 5-7)](second-order-linear-equations-lec-5-7.html) (raw notes, not reviewed or revised yet.)
|
||||||
|
[More second order stuff (lec 8)](more-second-order-stuff-lec-8.html) (raw notes, not reviewed or revised yet.)
|
||||||
|
[Undetermined coefficients (lec 9)](undetermined-coefficients-lec-9.html) (raw notes, not reviewed or revised yet.)
|
||||||
|
</br>
|
||||||
|
[How to solve any DE, a flow chart](Solve-any-DE.png)
|
||||||
|
</br>
|
||||||
|
I'd like to add a search by tag feature. I'm also thinking of hosting the source code for all this on a git server. That way, people can contribute and fix my notes for me :P
|
||||||
|
It would also allow people to contribute or host their own notes, which would be pretty cool. (Side note: I am against sharing instructor materials without their approved consent.)
|
|
@ -0,0 +1,396 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="404 Page not found" />
|
||||||
|
<meta property="og:description" content="" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:url" content="/404.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content="404 Page not found"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title> - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
<h1>404</h1>
|
||||||
|
<p>Note not found</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,538 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="Bernoulli’s equation:
|
||||||
|
$$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad,\quad n\in\mathbb{R}$$
|
||||||
|
(I’m calling this #de_b_type1) It looks almost like a linear equation! In fact if n=0 it is by definition. We will see further that if n=1 you also still get a linear equation.
|
||||||
|
Bernoulli’s …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="Bernoulli’s equation: $$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad,\quad n\in\mathbb{R}$$ (I’m calling this #de_b_type1) It looks almost like a linear equation! In fact if n=0 it is by definition. We will see further that if n=1 you also still get a linear equation. Bernoulli’s equations are important as you will see it in biology and in engineering.
|
||||||
|
If y is + then y(x)=0 is a solution to the equation: $\frac{dy}{dx}+0=0\quad\Rightarrow \quad0=0$ Let’s move the y to the LHS: $y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$ notice that y(x)=0 is no longer a solution!" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/bernoulli-de-lec-3.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="Bernoulli’s equation: $$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad,\quad n\in\mathbb{R}$$ (I’m calling this #de_b_type1) It looks almost like a linear equation! In fact if n=0 it is by definition. We will see further that if n=1 you also still get a linear equation. Bernoulli’s equations are important as you will see it in biology and in engineering.
|
||||||
|
If y is + then y(x)=0 is a solution to the equation: $\frac{dy}{dx}+0=0\quad\Rightarrow \quad0=0$ Let’s move the y to the LHS: $y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$ notice that y(x)=0 is no longer a solution!"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Bernoulli DE (lec 3) - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="bernoullis-equation">Bernoulli’s equation:</h1>
|
||||||
|
<h3 id="frac-dy--dx--pxyqxyn-quadquad-ninmathbbr">$$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad,\quad n\in\mathbb{R}$$</h3>
|
||||||
|
<p>(I’m calling this
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_b_type1)</a> It looks almost like a linear equation! In fact if n=0 it is by definition. We will see further that if n=1 you also still get a linear equation.
|
||||||
|
Bernoulli’s equations are important as you will see it in biology and in engineering.</p>
|
||||||
|
<p>If y is + then y(x)=0 is a solution to the equation:
|
||||||
|
$\frac{dy}{dx}+0=0\quad\Rightarrow \quad0=0$
|
||||||
|
Let’s move the y to the LHS:
|
||||||
|
$y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$
|
||||||
|
notice that y(x)=0 is no longer a solution! It was lost due to dividing by zero. So from here on out we will have to remember to add it back in our final answers.
|
||||||
|
let $y^{1-n}=u$
|
||||||
|
Differentiating this with respect to x gives us:
|
||||||
|
$(1-n)y^{-n}\frac{ dy }{ dx }=\frac{du}{dx}$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>notice that when n=1 the above turns into a linear equation:
|
||||||
|
$0=\frac{ du }{ dx }$
|
||||||
|
$y^{1-n}=u=0+C$
|
||||||
|
1=C
|
||||||
|
Hold on I dont think I did the above correctly. Anyways.
|
||||||
|
So we consider that $n\ne 0,1$ for Bernoulli’s equations as we can solve those cases with earlier tools.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$y^{-n}\frac{ dy }{ dx }=\frac{ du }{ dx }{\frac{1}{1-n}}$
|
||||||
|
substituting in we get:
|
||||||
|
$y^{-n}\frac{ dy }{ dx }+P(x)u=Q(x)=\frac{ du }{ dx }{\frac{1}{1-n}+P(x)u}$</p>
|
||||||
|
<p>and we get a linear equation again: (Handy formula if you wanna solve specific Bernoulli equations quick.)
|
||||||
|
$$\frac{1}{1-n}\frac{ du }{ dx }+P(x)=Q(x)\quad \Box$$</p>
|
||||||
|
<hr>
|
||||||
|
<h1 id="examples-of-bernoullis-equation">Examples of Bernoulli’s equation:</h1>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_b_type1</a> Find the general solution to:
|
||||||
|
$y'+y=(xy)^2$
|
||||||
|
Looks like a Bernoulli equation because when we distribute the $^2$ we get $x^2y^2$ on the RHS. This also tells us that n=2
|
||||||
|
$y'+y=x^2y^2$
|
||||||
|
$y’y^{-2}+y^{-1}=x^2$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Note that we lost the y(x)=0 solution here, we will have to add it back in the end.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>let $u=y^{1-n}=y^{-1}$
|
||||||
|
Differentiating wrt. x we get: $\frac{du}{dx}=-y^{-2}{\frac{dy}{dx}}$
|
||||||
|
$y^{-2}{\frac{dy}{dx}=-\frac{ du }{ dx }}$
|
||||||
|
$y^{-2}{\frac{dy}{dx}+y^{-1}=-\frac{ du }{ dx }}+y^{-1}$
|
||||||
|
${x^2=-\frac{ du }{ dx }}+y^{-1}$
|
||||||
|
$x^2=-\frac{du}{dx}+u$
|
||||||
|
$\frac{du}{dx}-u=-x^2$
|
||||||
|
Yay we have a linear equation now! We can solve it using the techniques & formulas we learned for them.
|
||||||
|
let $P(x)=-1 \quad Q(x)=-x^2 \qquad I(x)=e^{\int -1 , dx}=e^{-x}$
|
||||||
|
$u=-e^{x}\int e^{-x}x^2 , dx$
|
||||||
|
LIATE log, inv, alg, trig, exp
|
||||||
|
$\int fg' , dx=fg-\int f’g , dx$
|
||||||
|
let $f=x^2 \qquad f'=2x \qquad g'=e^{-x} \qquad g=-e^{-x}$
|
||||||
|
$u=-e^{x}\left( x^2(-e^{-x})-\int 2x(-e^{-x}) , dx \right)$
|
||||||
|
$u=-e^{x}\left( -x^2e^{-x}+2\int xe^{-x} , dx \right)$
|
||||||
|
let $f=x \qquad f'=1 \qquad g'=e^{-x} \qquad g=-e^{-x}$
|
||||||
|
$u=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-\int -e^{-x} , dx \right) \right)$
|
||||||
|
$\frac{1}{y}=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-e^{-x} +C\right) \right)$
|
||||||
|
$\frac{1}{y}=x^2+2(x+1+Ce^x)$
|
||||||
|
$\frac{1}{y}=x^2+2x+2+Ce^x$
|
||||||
|
The general solution to the DE is:
|
||||||
|
$y(x)=\frac{1}{x^2+2x+2+Ce^x}$ as well as $y(x)=0$</p>
|
||||||
|
<hr>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">end</a> of lecture 3</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,593 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="#start of lecture 2
|
||||||
|
2 new tricks: homogenous and linear DE
|
||||||
|
Homogenous equations:
|
||||||
|
$\frac{dy}{dt}=f\left( \frac{y}{t} \right)$ (I’m calling this #de_h_type1)
|
||||||
|
let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$
|
||||||
|
so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$
|
||||||
|
The homogenous equation has …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="#start of lecture 2
|
||||||
|
2 new tricks: homogenous and linear DE Homogenous equations: $\frac{dy}{dt}=f\left( \frac{y}{t} \right)$ (I’m calling this #de_h_type1) let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$ so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$ The homogenous equation has been converted into a separable DE! $\frac{du}{dt}=\frac{f(u)-u}{t}$ $\frac{du}{f(u)-u}=\frac{dt}{t}$
|
||||||
|
Another way you can write a homogenous equation: $\frac{dy}{dx}=G(ax+by)\quad \text{where a, b }\in \mathbb{R}$ (I’m calling this #de_h_type2) Then, let $u=ax+by$ $\frac{du}{dx}=a+b{\frac{dy}{dx}}$ $\frac{dy}{dx}=\frac{1}{b}{\frac{du}{dx}}-\frac{a}{b}=G(u)$ Again, the homogenous equation has been converted to a separable DE!" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/homogenous-de-lec-2.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="#start of lecture 2
|
||||||
|
2 new tricks: homogenous and linear DE Homogenous equations: $\frac{dy}{dt}=f\left( \frac{y}{t} \right)$ (I’m calling this #de_h_type1) let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$ so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$ The homogenous equation has been converted into a separable DE! $\frac{du}{dt}=\frac{f(u)-u}{t}$ $\frac{du}{f(u)-u}=\frac{dt}{t}$
|
||||||
|
Another way you can write a homogenous equation: $\frac{dy}{dx}=G(ax+by)\quad \text{where a, b }\in \mathbb{R}$ (I’m calling this #de_h_type2) Then, let $u=ax+by$ $\frac{du}{dx}=a+b{\frac{dy}{dx}}$ $\frac{dy}{dx}=\frac{1}{b}{\frac{du}{dx}}-\frac{a}{b}=G(u)$ Again, the homogenous equation has been converted to a separable DE!"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Homogenous DE (lec 2) - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>#start of lecture 2</p>
|
||||||
|
<h1 id="2-new-tricks-homogenous-and-linear-de">2 new tricks: homogenous and linear DE</h1>
|
||||||
|
<h2 id="homogenous-equations">Homogenous equations:</h2>
|
||||||
|
<p>$\frac{dy}{dt}=f\left( \frac{y}{t} \right)$ (I’m calling this <a class="hashtag" onclick="focusTag(this)">de_h_type1)</a>
|
||||||
|
let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$
|
||||||
|
so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$
|
||||||
|
The homogenous equation has been converted into a separable DE!
|
||||||
|
$\frac{du}{dt}=\frac{f(u)-u}{t}$
|
||||||
|
$\frac{du}{f(u)-u}=\frac{dt}{t}$</p>
|
||||||
|
<h2 id="another-way-you-can-write-a-homogenous-equation">Another way you can write a homogenous equation:</h2>
|
||||||
|
<p>$\frac{dy}{dx}=G(ax+by)\quad \text{where a, b }\in \mathbb{R}$ (I’m calling this <a class="hashtag" onclick="focusTag(this)">de_h_type2)</a>
|
||||||
|
Then, let $u=ax+by$
|
||||||
|
$\frac{du}{dx}=a+b{\frac{dy}{dx}}$
|
||||||
|
$\frac{dy}{dx}=\frac{1}{b}{\frac{du}{dx}}-\frac{a}{b}=G(u)$
|
||||||
|
Again, the homogenous equation has been converted to a separable DE!
|
||||||
|
$dx=\frac{du}{b{G(u)+\frac{a}{b}}}$
|
||||||
|
Just integrate both sides as usual and you’re chilling.</p>
|
||||||
|
<h2 id="examples-of-homogenous-equations">Examples of homogenous equations:</h2>
|
||||||
|
<h3 id="heading"></h3>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_h_type1</a>:$\frac{dy}{dx}=\frac{{x+y}}{x-y} \quad x>y\quad\text{This condition is added so the denominator}\ne 0$</p>
|
||||||
|
<p>but $\frac{{x+y}}{x-y}\ne f(\frac{y}{x})$… Or is it? How can this be written as a homogenous equation?
|
||||||
|
divide the top and bottom by x:
|
||||||
|
$\frac{dy}{dx}=\frac{{1+\frac{y}{x}}}{1-\frac{y}{x}}$
|
||||||
|
Yay! now it’s a function of $\frac{y}{x}$
|
||||||
|
let $u=\frac{y}{x} \quad \frac{dy}{dx}=u+x{\frac{du}{dx}}$
|
||||||
|
$\frac{dy}{dx}=\frac{1+u}{1-u}=u+x{\frac{du}{dx}}$
|
||||||
|
$\frac{dx({f(u)-u})}{x}=du$
|
||||||
|
$\frac{dx}{x}=\frac{du}{{f(u)-u}}$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>That’s odd, why is it not $\frac{du}{f(u)-u}=\frac{x}{dx}$? I got this by moving the top over.
|
||||||
|
(it’s because you must move all multiplicative factors when using this technique of moving the top. Be careful!)</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$\int\frac{dx}{x}=\int\frac{du}{{f(u)-u}}$
|
||||||
|
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u}}{1-u}-u}$
|
||||||
|
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u-u+u^2}}{1-u}}$
|
||||||
|
$\ln\mid x\mid=\int \frac{1-u}{{1+u^2}}du$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>let $1+u^2=v \quad dv=2udu$
|
||||||
|
$=\int \frac{{1-u}}{v} , du$ Gah, doesn’t work. I didn’t notice I could split the integral up first.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$\ln\mid x\mid=\int \frac{1}{{1+u^2}},du-\int \frac{u}{1+u^2} , du=\arctan\left( \frac{y}{x} \right)+C-I_{0}$
|
||||||
|
for $I_{0}$ let $v=1+u^2 \quad dv=2udu$
|
||||||
|
$I_{0}=\int \frac{u}{v} , \frac{dv}{2u}=\frac{1}{2}\int \frac{dv}{v}=\frac{1}{2}\ln(1+u^2)$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>^Note no abs value needed in the $\ln()$ as $1+u^2$ is always +</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln(1+u^2)$
|
||||||
|
$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln\left( 1+\frac{y^2}{x^2} \right)$
|
||||||
|
$\mid x\mid=e^{\arctan(\frac{y}{x})+C-\ln(\sqrt{ 1+y^2/x^2 })}$
|
||||||
|
$x=\frac{e^{\arctan(y/x)}A}{\sqrt{ 1+\frac{y^2}{x^2} }}$
|
||||||
|
$x\sqrt{ 1+\frac{y^2}{x^2}} ={e^{\arctan(y/x)}A}$
|
||||||
|
So the final general solution to the problem is:</p>
|
||||||
|
<h4 id="sqrt-x2y2-earctanleft-fracyx-righta">$$\sqrt{ x^2+y^2 }=e^{\arctan\left( \frac{y}{x} \right)}A$$</h4>
|
||||||
|
<hr>
|
||||||
|
<h3 id="heading-1"></h3>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_h_type2</a>: $$(2x-2y-1)dx+(x-y+1)dy=0$$
|
||||||
|
Can we write it in the form $\frac{dy}{dx}=G(ax+by)$?
|
||||||
|
$(x-y+1)dy=-(2x-2y-1)dx$
|
||||||
|
$\frac{dy}{dx}=\frac{{2y+1-2x}}{x-y+1}$
|
||||||
|
factor out a -2?
|
||||||
|
$\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
|
||||||
|
Yep! looks like a
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_h_type2</a>
|
||||||
|
let $u=x-y$
|
||||||
|
$\frac{du}{dx}=1-\frac{dy}{dx}$
|
||||||
|
$1-\frac{du}{dx}=\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Obviously we don’t work with x and y as I was entailing above, substitute $u=x-y$ in you silly goose.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$1-\frac{du}{dx}=-2\frac{{u-\frac{1}{2}}}{u+1}$
|
||||||
|
$\frac{du}{dx}=2\frac{{u-\frac{1}{2}}}{u+1}+1$
|
||||||
|
$\frac{du}{dx}=\frac{2u-1}{u+1}+1$
|
||||||
|
$\frac{du}{dx}=\frac{{2u-1+u+1}}{u+1}$
|
||||||
|
$\frac{du}{dx}=\frac{3u}{u+1}$
|
||||||
|
$\frac{(u+1)du}{3u}=dx$
|
||||||
|
$\int \frac{(u+1)du}{3u}=\int dx$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=\ln\mid x\mid+C$
|
||||||
|
Ah, I made a mistake. $\int dx \ne \ln\mid x\mid+C$</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=x+C$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Okay, now that we have integrated, we can start talking in terms of x and y again</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$\frac{x-y}{3}+\frac{1}{3}\ln\mid x-y\mid = x+C$
|
||||||
|
$x-y+\ln\mid x-y\mid=3x+C$
|
||||||
|
$\ln\mid x-y\mid=C+y+2x$ < this is where he moved the C to the left
|
||||||
|
$\mid x-y\mid=e^Ce^ye^{2x}$
|
||||||
|
$x-y=Ae^ye^{2x}$
|
||||||
|
$A(x-y)=e^{y+2x}$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>I know that above step looks illegal, but the prof did this (indirectly, he moved C to the LHS in a prior step without regarding it’s sign). I wonder what happens if A was 0 though? Do we get divide by zero errors? Thinking about it more, we are changing $x-y=0$ to $e^{y+2x}=0$ when $A=0$ The first one has a solution (y=x) the second loses that solution because of ln(0) issues (gives a function that’s undefined for all x). when checking y(x)=x in the DE, it is a valid solution. So it is an illegal step! Because we lost a valid solution. I’ll have to check with the prof.
|
||||||
|
Interestingly, if we act like $e^{y+2x}=0$ is defined, we get $\frac{dy}{dx}=-2$</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>Proof:
|
||||||
|
$\lim_{ n \to 0 }e^{y+2x}=n$
|
||||||
|
$\lim_{ n \to 0 }\ln(n)=y+2x$
|
||||||
|
$\lim_{ n \to 0 }\frac{d}{dx}\ln(n)=0=\frac{dy}{dx}+2$
|
||||||
|
$\frac{dy}{dx}=-2$</p>
|
||||||
|
<blockquote>
|
||||||
|
</blockquote>
|
||||||
|
<p>so from $\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$ we get:
|
||||||
|
$-2=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
|
||||||
|
$x-y+1=x-y-\frac{1}{2}$
|
||||||
|
$1=-\frac{1}{2}$
|
||||||
|
So what does this all mean? I honestly have no idea. I think it means we assumed that $e^{y+2x}=0$ is defined and because we arrived at a contradiction, our assumption was wrong. That didn’t really get us to show if it was a valid solution or not like I imagined.</p>
|
||||||
|
<p>We can rearrange to our liking, but we have found the general solution to the DE:</p>
|
||||||
|
<h4 id="x-yae2xy">$$x-y=Ae^{2x+y}$$</h4>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,460 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content="Hugo 0.80.0" />
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="This is the main index
|
||||||
|
I have written these notes for myself, I thought it would be cool to share them. These notes may be inaccurate, incomplete, or incoherent. No warranty is expressed or implied. Reader assumes all risk and liabilities.
|
||||||
|
Seperable DE (lec 1)
|
||||||
|
Homogenous DE (lec 2)
|
||||||
|
Linear DE (lec …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:url" content="/" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="this-is-the-main-index">This is the main index</h1>
|
||||||
|
<p>I have written these notes for myself, I thought it would be cool to share them. These notes may be inaccurate, incomplete, or incoherent. No warranty is expressed or implied. Reader assumes all risk and liabilities.</p>
|
||||||
|
<p><a href="seperable-de-lec-1.html">Seperable DE (lec 1)</a></p>
|
||||||
|
<p><a href="homogenous-de-lec-2.html">Homogenous DE (lec 2)</a></p>
|
||||||
|
<p><a href="linear-de-lec-23.html">Linear DE (lec 2&3)</a></p>
|
||||||
|
<p><a href="bernoulli-de-lec-3.html">Bernoulli DE (lec 3)</a></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,178 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{"index":[{"permalink":"/lec-4.html","summary":"two new equations Linear coefficients equations …","tags":["\n#ex"," #de_LC_type1","\n#end"],"thumbnail":"","title":"(lec 4)"},{"permalink":"/bernoulli-de-lec-3.html","summary":"Bernoulli\u0026rsquo;s equation: $$\\frac{ dy }{ dx } +P(x)y=Q(x)y^n …","tags":[" #de_b_type1)","\n#ex"," #de_b_type1","\n#end"],"thumbnail":"","title":"Bernoulli DE (lec 3)"},{"permalink":"/homogenous-de-lec-2.html","summary":"#start of lecture 2\n2 new tricks: homogenous and linear DE Homogenous …","tags":[" #de_h_type1)"," #de_h_type2)"," #ex"," #de_h_type1"," #de_h_type2"],"thumbnail":"","title":"Homogenous DE (lec 2)"},{"permalink":"/linear-de-lec-23.html","summary":"The world is non-linear, many solutions, many paths to the solution. …","tags":[" #de_L_type1)"," #de_L_type2)"," #remember","\n#end"," #start","\n#ex"," #de_L_type2"," #de_L_type1"," #IVP"],"thumbnail":"","title":"Linear DE (lec 2\u00263)"},{"permalink":"/seperable-de-lec-1.html","summary":"#start of lecture 1\nIntro (Newton example): Newton example where we …","tags":[" #de_s_type1)","\n#ex"," #IVP"," #de_s_type1","\n#end"],"thumbnail":"","title":"Seperable DE (lec 1)"},{"permalink":"/things-to-remember.html","summary":"This is an incomplete list. I\u0026rsquo;m trying to add to it as I go. …","tags":[" #remember"],"thumbnail":"","title":"Things to remember"}],"tags":["de_b_type1","de_b_type1)","de_h_type1","de_h_type1)","de_h_type2","de_h_type2)","de_L_type1","de_L_type1)","de_L_type2","de_L_type2)","de_LC_type1","de_s_type1","de_s_type1)","end","ex","IVP","remember","start"]}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,545 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="two new equations
|
||||||
|
Linear coefficients equations
|
||||||
|
$$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0 \qquad a_{1},b_{1},c_{1},a_{2},b_{2},c_{2}\in \mathbb{R}$$
|
||||||
|
imagine $c_{1},c_{2}=0$ It becomes a homogenous equation!
|
||||||
|
so can we make them 0?
|
||||||
|
let $x=u+k$
|
||||||
|
$y=v+l$
|
||||||
|
where $k,l$ are constants …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="two new equations Linear coefficients equations $$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0 \qquad a_{1},b_{1},c_{1},a_{2},b_{2},c_{2}\in \mathbb{R}$$ imagine $c_{1},c_{2}=0$ It becomes a homogenous equation!
|
||||||
|
so can we make them 0? let $x=u+k$ $y=v+l$ where $k,l$ are constants $(a_{1}u+b_{1}vK+\underbrace{\cancel{ c_{1}+a_{1}k+b_{1}l } }_{ 0 })du+(a_{2}u+b_{2}v+\underbrace{ \cancel{ c_{2}+a_{2}k+b_{2}l } }_{ 0 })dv=0$ $a_{1}k+b_{1}l=-c_1$ $a_{2}k+b_{2}l=-c_{2}$ if $\det(a_{1},b_{1},a_{2},b_{2})\ne 0$ turn into homogenous if $\det(\dots)=0 \Rightarrow$ equation of type $\frac{ dy }{ dx }=G(ax+by)$ (also homogenous)
|
||||||
|
Example #ex #de_LC_type1 $$(-3x+y+6)dx+(x+y+2)dy=0$$ let $x=u+k$ $y=v+l$ $(-3u+v+6-3k+l)du+(u+v+2+k+l)dv=0$ we want $6-3k+l$ and $2+k+l$ to equal 0 so: $-3k+l=-6$ $k+l=-2$ $det(-3,1,1,1)=-4$ //he can call it a dinosaur if he wanted to :D solving gives us: $k=1,l=-3$ so $x=u+1 \quad y=v-3$ $(-3u+v)du+(u+v)dv=0$ //Beutiful1!" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/lec-4.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="two new equations Linear coefficients equations $$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0 \qquad a_{1},b_{1},c_{1},a_{2},b_{2},c_{2}\in \mathbb{R}$$ imagine $c_{1},c_{2}=0$ It becomes a homogenous equation!
|
||||||
|
so can we make them 0? let $x=u+k$ $y=v+l$ where $k,l$ are constants $(a_{1}u+b_{1}vK+\underbrace{\cancel{ c_{1}+a_{1}k+b_{1}l } }_{ 0 })du+(a_{2}u+b_{2}v+\underbrace{ \cancel{ c_{2}+a_{2}k+b_{2}l } }_{ 0 })dv=0$ $a_{1}k+b_{1}l=-c_1$ $a_{2}k+b_{2}l=-c_{2}$ if $\det(a_{1},b_{1},a_{2},b_{2})\ne 0$ turn into homogenous if $\det(\dots)=0 \Rightarrow$ equation of type $\frac{ dy }{ dx }=G(ax+by)$ (also homogenous)
|
||||||
|
Example #ex #de_LC_type1 $$(-3x+y+6)dx+(x+y+2)dy=0$$ let $x=u+k$ $y=v+l$ $(-3u+v+6-3k+l)du+(u+v+2+k+l)dv=0$ we want $6-3k+l$ and $2+k+l$ to equal 0 so: $-3k+l=-6$ $k+l=-2$ $det(-3,1,1,1)=-4$ //he can call it a dinosaur if he wanted to :D solving gives us: $k=1,l=-3$ so $x=u+1 \quad y=v-3$ $(-3u+v)du+(u+v)dv=0$ //Beutiful1!"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>(lec 4) - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="two-new-equations">two new equations</h1>
|
||||||
|
<h2 id="linear-coefficients-equations">Linear coefficients equations</h2>
|
||||||
|
<p>$$(a_{1}x+b_{1}y+c_{1})dx+(a_{2}x+b_{2}y+c_{2})dy=0 \qquad a_{1},b_{1},c_{1},a_{2},b_{2},c_{2}\in \mathbb{R}$$
|
||||||
|
imagine $c_{1},c_{2}=0$ It becomes a homogenous equation!</p>
|
||||||
|
<p>so can we make them 0?
|
||||||
|
let $x=u+k$
|
||||||
|
$y=v+l$
|
||||||
|
where $k,l$ are constants
|
||||||
|
$(a_{1}u+b_{1}vK+\underbrace{\cancel{ c_{1}+a_{1}k+b_{1}l } }_{ 0 })du+(a_{2}u+b_{2}v+\underbrace{ \cancel{ c_{2}+a_{2}k+b_{2}l } }_{ 0 })dv=0$
|
||||||
|
$a_{1}k+b_{1}l=-c_1$
|
||||||
|
$a_{2}k+b_{2}l=-c_{2}$
|
||||||
|
if $\det(a_{1},b_{1},a_{2},b_{2})\ne 0$ turn into homogenous
|
||||||
|
if $\det(\dots)=0 \Rightarrow$ equation of type $\frac{ dy }{ dx }=G(ax+by)$ (also homogenous)</p>
|
||||||
|
<h3 id="example">Example</h3>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a> <a class="hashtag" onclick="focusTag(this)">de_LC_type1</a>
|
||||||
|
$$(-3x+y+6)dx+(x+y+2)dy=0$$
|
||||||
|
let $x=u+k$
|
||||||
|
$y=v+l$
|
||||||
|
$(-3u+v+6-3k+l)du+(u+v+2+k+l)dv=0$
|
||||||
|
we want $6-3k+l$ and $2+k+l$ to equal 0
|
||||||
|
so:
|
||||||
|
$-3k+l=-6$
|
||||||
|
$k+l=-2$
|
||||||
|
$det(-3,1,1,1)=-4$ //he can call it a dinosaur if he wanted to :D
|
||||||
|
solving gives us:
|
||||||
|
$k=1,l=-3$
|
||||||
|
so $x=u+1 \quad y=v-3$
|
||||||
|
$(-3u+v)du+(u+v)dv=0$ //Beutiful1! it’s homogenous now
|
||||||
|
$\frac{ dv }{ du }=\frac{{3u-v}}{u+v}=\frac{{3-\frac{v}{u}}}{1+\frac{v}{u}}$
|
||||||
|
$\frac{v}{u}=w \quad v=uw \quad \frac{ dv }{ du }=w+u\frac{ dw }{ du }$
|
||||||
|
$w+u\frac{ dw }{ du }=\frac{{3-w}}{1+w}$ This is the equation we have to solve
|
||||||
|
$u\frac{ dw }{ du }=\frac{{3-2w-w^2}}{1+w}$
|
||||||
|
$-\frac{{w+1}}{w^2+2w-3}dw=\frac{du}{u}$
|
||||||
|
$\int-\frac{{w+1}}{w^2+2w-3}dw=\int\frac{du}{u}$
|
||||||
|
let $z=w^2+2w-3$
|
||||||
|
$dz=2(w+1)dw$
|
||||||
|
$\frac{1}{2}\int \frac{dz}{z}=\ln\mid u\mid^{-1}$
|
||||||
|
$\ln\mid z\mid^{1/2}-\ln\mid u\mid^{-1}=C$
|
||||||
|
$\ln(\mid z\mid^{1/2}\mid u\mid)=C$
|
||||||
|
$\mid z\mid^{1/2}u=e^C$
|
||||||
|
$\mid z\mid u^2=e^{2C}$
|
||||||
|
$zu^2=A$
|
||||||
|
$\left( \left( \frac{v}{u} \right)^2+\frac{2v}{u}-3 \right)u^2=A$
|
||||||
|
remember $u=x-1 \quad v=y+3$
|
||||||
|
$$\left( \left( \frac{{y+3}}{x-1} \right)^2+\frac{2(y+3)}{x-1}-3 \right)(x-1)^2=A$$
|
||||||
|
you can “simplify” it to: $(y+3)^2+2(y+3)(x-1)-3(x-1)^2=A$</p>
|
||||||
|
<hr>
|
||||||
|
<h2 id="exact-equations">Exact equations</h2>
|
||||||
|
<p>two variable equations
|
||||||
|
$dF=\frac{ \partial F }{ \partial x }dx+\frac{ \partial F }{ \partial y }dy=0$ suppose it equals to zero (as shown in the equation) you get a horizontal plane (a constant)
|
||||||
|
so $F(x,y)=C$
|
||||||
|
the solution to these exact equations is given by $F()$ but how do we get F from the derivatives?
|
||||||
|
Equation of the form: $$M(x,y)dx=N(x,y)dy=0$$
|
||||||
|
is called exact if $M(x,y)=\frac{ \partial F }{ \partial x }$ and $N(x,y)=\frac{ \partial F }{ \partial y }$ for some function $F(x,y)$
|
||||||
|
then differentiating we get:
|
||||||
|
$\frac{ \partial M }{ \partial y }=\frac{ \partial^{2} F }{ \partial y\partial x }$
|
||||||
|
$\frac{ \partial N }{ \partial x }=\frac{ \partial^{2} F }{ \partial x\partial y }$ Order of going in x then y vs y then x doesn’t matter as it lands you on the same point (idk how this is related yet)
|
||||||
|
Exact equation$\Rightarrow \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$ if it’s continuous (?)
|
||||||
|
also: Exact equation$\Leftarrow \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$
|
||||||
|
Test for exactness:
|
||||||
|
exact $\iff \frac{ \partial M }{ \partial y }=\frac{ \partial N }{ \partial x }$ (this can be proved, but it wasnt proved in class)
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">end</a> of lecture 4</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,553 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="The world is non-linear, many solutions, many paths to the solution. It’s why linear equations play so nice. We just look down it’s path and we will know that it’s a straight line for eternity.
|
||||||
|
Linear equation:
|
||||||
|
$$a(x)\frac{ dy }{ dx }+b(x)y=f(x)$$ (I’m calling this …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="The world is non-linear, many solutions, many paths to the solution. It’s why linear equations play so nice. We just look down it’s path and we will know that it’s a straight line for eternity.
|
||||||
|
Linear equation: $$a(x)\frac{ dy }{ dx }+b(x)y=f(x)$$ (I’m calling this #de_L_type1) if we assume $b(x)=a'(x)$ it kinda starts to look like a product rule $a(x)y'+a'(x)y=f(x)=(ay)'$ $ay=\int f(x) , dx$ <-yay! We can find the solutions to y." />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/linear-de-lec-23.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="The world is non-linear, many solutions, many paths to the solution. It’s why linear equations play so nice. We just look down it’s path and we will know that it’s a straight line for eternity.
|
||||||
|
Linear equation: $$a(x)\frac{ dy }{ dx }+b(x)y=f(x)$$ (I’m calling this #de_L_type1) if we assume $b(x)=a'(x)$ it kinda starts to look like a product rule $a(x)y'+a'(x)y=f(x)=(ay)'$ $ay=\int f(x) , dx$ <-yay! We can find the solutions to y."/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Linear DE (lec 2&3) - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>The world is non-linear, many solutions, many paths to the solution. It’s why linear equations play so nice. We just look down it’s path and we will know that it’s a straight line for eternity.</p>
|
||||||
|
<h1 id="linear-equation">Linear equation:</h1>
|
||||||
|
<p>$$a(x)\frac{ dy }{ dx }+b(x)y=f(x)$$ (I’m calling this <a class="hashtag" onclick="focusTag(this)">de_L_type1)</a>
|
||||||
|
if we assume $b(x)=a'(x)$ it kinda starts to look like a product rule
|
||||||
|
$a(x)y'+a'(x)y=f(x)=(ay)'$
|
||||||
|
$ay=\int f(x) , dx$ <svg width="11px" height="10px" viewBox="0 0 11 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="left-arrow" transform="translate(5.500000, 5.000000) scale(-1, 1) translate(-5.500000, -5.000000) "> <path d="M1.77635684e-14,5 L9,5" id="rod" stroke="#000000" stroke-width="2"></path> <path d="M11,5 L6,0.5 L6,9.5 L11,5 Z" id="point" fill="#000000"></path></g></svg>yay! We can find the solutions to y.</p>
|
||||||
|
<p>we can rewrite the linear equation in what’s called standard form:
|
||||||
|
$$\frac{ dy }{ dx }+P(x)y=Q(x)$$ (I’m calling this <a class="hashtag" onclick="focusTag(this)">de_L_type2)</a>
|
||||||
|
we will define a function $\mu(x)$ called the integration factor, also expressed as $I(x)$
|
||||||
|
Multiply both sides by $\mu(x)$
|
||||||
|
$\mu(x) \frac{ dy }{ dx }+\underbrace{ \mu(x)P(x) }_{ \mu'(x) }y=\mu(x)Q(x)$
|
||||||
|
Like shown above we imagine if $\mu(x) P(x)=\mu'(x)$ as it starts to look like the product rule again.
|
||||||
|
$(\mu y)'=\mu(x)Q(x)$
|
||||||
|
This is nice as now we can integrate both sides as usual and get a solution for y.
|
||||||
|
$y=\frac{1}{\mu(x)}\int \mu(x)Q(x) , dx$ <a class="hashtag" onclick="focusTag(this)">remember</a>
|
||||||
|
But what is $\mu(x)$? How do we find it?
|
||||||
|
In order for $\mu(x) P(x)=\mu'(x)$ to be true, $\frac{ d\mu }{ dx }=\mu(x)P(x)\Rightarrow \frac{ d\mu }{ \mu }=P(x)dx\Rightarrow\int \frac{d\mu}{\mu}=\int P(x) , dx\Rightarrow\ \ln\mid \mu\mid=\int P(x) , dx$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>I’m not sure why the professor allows the absolute value to be dropped in the following step, I think he said that he argues all solutions can be found even if we focus only where $\mu$ is +, idk.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>finally we get that $\mu(x)=I(x)=e^{\int P(x) , dx}\quad \Box$ <a class="hashtag" onclick="focusTag(this)">remember</a></p>
|
||||||
|
<hr>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">end</a> of lecture 2
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">start</a> of lecture 3</p>
|
||||||
|
<h1 id="examples-of-linear-equations">Examples of linear equations:</h1>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_L_type2</a> Find the general solution to the equation:</p>
|
||||||
|
<h2 id="1sinxy2cosxytanx">$$(1+\sin(x))y'+2\cos(x)y=\tan(x)$$</h2>
|
||||||
|
<p>let $a(x)=1+sin(x)\qquad b(x)=2\cos(x)$
|
||||||
|
we can see that $b(x)\ne a'(x)$ :( so we cant use
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_L_type1</a>
|
||||||
|
let’s rearrange it into standard form:
|
||||||
|
$y'+\frac{{2\cos(x)}}{1+\sin(x)}=\frac{\tan(x)}{1+\sin(x)}$
|
||||||
|
$P(x):=\frac{2\cos(x)}{1+\sin(x)} \qquad Q(x)=\frac{\tan(x)}{1+\sin(x)}$
|
||||||
|
then $I(x)=e^{\int {2\cos(x)}/(1+\sin(x)), dx}$
|
||||||
|
let $u=1+\sin(x) \qquad du=\cos(x)dx$
|
||||||
|
$I(x)=e^{\int \frac{2\cos(x)}{u} , \frac{du}{\cos(x)}}$
|
||||||
|
$I(x)=e^{2\ln\mid u\mid}$
|
||||||
|
$I(x)=\mid u\mid^2$
|
||||||
|
$I(x)=\mid1+\sin(x)\mid^2$
|
||||||
|
$I(x)=(1+\sin(x))^2$
|
||||||
|
$y=\frac{1}{I(x)}\int I(x)Q(x) , dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}\int (\frac{(1+\sin(x))^2\tan(x)}{1+\sin(x)} , dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}\int \tan(x)+\frac{\sin^2(x)}{\cos(x)} , dx$
|
||||||
|
$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\int \frac{\sin^2(x)}{\cos(x)} , dx)$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>using u substitution doesnt work for the second integral because I got $\int\frac{\sin(x)}{u}du \qquad u=\cos(x)$
|
||||||
|
could try using $\sin^2(x)=\frac{{1-\cos(2x)}}{2}$ but looks hard with the 2x term,
|
||||||
|
let’s try using $\sin^2(x)=1-\cos^2(x)$ instead. (also because I also remember this is what we used in class)</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\int \frac{1-\cos^2(x)}{\cos(x)} , dx)$</p>
|
||||||
|
<p>$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\ln\mid sec(x)+\tan(x)\mid+\int -\cos(x) , dx)$
|
||||||
|
Albeit a bit ugly, we have found the general solution to the DE:
|
||||||
|
$$y=\frac{1}{(1+\sin(x))^2}(\ln\mid sec(x)\mid+\ln\mid sec(x)+\tan(x)\mid-\sin(x)+C)$$</p>
|
||||||
|
<hr>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">IVP</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">de_L_type2</a></p>
|
||||||
|
<h2 id="ytanxycos2x-qquad-yleft-fracpi4-rightfrac12">$$y'+\tan(x)y=\cos^2(x) \qquad y\left( \frac{\pi}{4} \right)=\frac{1}{2}$$</h2>
|
||||||
|
<p>Looks like a linear equation with an initial value.
|
||||||
|
$P(x)=\tan(x) \qquad Q(x)=\cos^2(x) \qquad I(x)=e^{\int \tan(x) , dx}$
|
||||||
|
$I(x)=e^{\ln\mid sec(x)\mid}$
|
||||||
|
$I(x)=\mid sec(x)\mid$
|
||||||
|
$I(x)=sec(x)$</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>The prof simply drops the absolute value. I don’t understand why. Sigma asf tbh. I think it’s because he said linear DE are nice because their solutions are unique with an IVP, non linear equations are not necessarily unique. So if we find one solution we know that we found the only solution possible.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>$y=\cos(x)\int sec(x)\cos^2(x) , dx$
|
||||||
|
$y=\cos(x)\int \cos(x) , dx$
|
||||||
|
$y=cos(x)(sin(x)+C)$
|
||||||
|
Now we issue the initial value:
|
||||||
|
$\frac{1}{2}=\cos\left( \frac{\pi}{4} \right)\sin\left( \frac{\pi}{4}+C) \right)$
|
||||||
|
$\frac{\frac{1}{2}}{\frac{1}{\sqrt{ 2 }}}=\frac{\sqrt{ 2 }}{2}=\frac{1}{\sqrt{ 2 }}=\sin\left( \frac{\pi}{4} \right)$
|
||||||
|
$C=0$
|
||||||
|
By plugging in C=0 in the general solution we get the solution to the IVP, as stated earlier, there can only be one solution to a linear IVP DE:</p>
|
||||||
|
<h3 id="ycosxsinx">$$y=\cos(x)\sin(x)$$</h3>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
|
@ -0,0 +1,519 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="#start of lecture 1
|
||||||
|
Intro (Newton example):
|
||||||
|
Newton example where we find the equations to describe a falling object using differential equations (DE’s)
|
||||||
|
We know $F=ma$
|
||||||
|
$F=m\frac{dv}{dt}=mg-kv$ <- we account for air resistance here. We can approximate the force of air resistance is …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="#start of lecture 1
|
||||||
|
Intro (Newton example): Newton example where we find the equations to describe a falling object using differential equations (DE’s) We know $F=ma$ $F=m\frac{dv}{dt}=mg-kv$ <- we account for air resistance here. We can approximate the force of air resistance is proportional to the speed times a constant. We can rearrange and solve it as it is a separable DE: $\frac{dv}{mg-kv}=\frac{dt}{m}$ integrating both sides: $\int \frac{dv}{mg-kv}=\frac{t}{m}+C$ let $u=mg-kv \quad du=-kdv$ $\int \frac{dv}{mg-kv}=\int \frac{du}{-k*u}=\frac{1}{-k}\ln\mid mg-kv\mid=\frac{t}{m}+C$ Very cool, but I want the velocity as a function of time, isolate v $\ln\mid mg-kv\mid=-\frac{kt}{m}+C$ $\mid mg-kv\mid=e^{\frac{-kt}{m}+C}=e^{\frac{-kt}{m}}e^C$ $e^C$ is a + constant, the absolute value will multiply the inside expression by -1 when the inside is negative, so we can replace the $e^C$ constant with an arbitrary constant A that can be + or - $mg-kv=Ae^{\frac{-kt}{m}}$ so, the general solution is $v(t)=\frac{1}{k}(mg-Ae^{\frac{-kt}{m}})$" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/seperable-de-lec-1.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="#start of lecture 1
|
||||||
|
Intro (Newton example): Newton example where we find the equations to describe a falling object using differential equations (DE’s) We know $F=ma$ $F=m\frac{dv}{dt}=mg-kv$ <- we account for air resistance here. We can approximate the force of air resistance is proportional to the speed times a constant. We can rearrange and solve it as it is a separable DE: $\frac{dv}{mg-kv}=\frac{dt}{m}$ integrating both sides: $\int \frac{dv}{mg-kv}=\frac{t}{m}+C$ let $u=mg-kv \quad du=-kdv$ $\int \frac{dv}{mg-kv}=\int \frac{du}{-k*u}=\frac{1}{-k}\ln\mid mg-kv\mid=\frac{t}{m}+C$ Very cool, but I want the velocity as a function of time, isolate v $\ln\mid mg-kv\mid=-\frac{kt}{m}+C$ $\mid mg-kv\mid=e^{\frac{-kt}{m}+C}=e^{\frac{-kt}{m}}e^C$ $e^C$ is a + constant, the absolute value will multiply the inside expression by -1 when the inside is negative, so we can replace the $e^C$ constant with an arbitrary constant A that can be + or - $mg-kv=Ae^{\frac{-kt}{m}}$ so, the general solution is $v(t)=\frac{1}{k}(mg-Ae^{\frac{-kt}{m}})$"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Seperable DE (lec 1) - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>#start of lecture 1</p>
|
||||||
|
<h3 id="intro-newton-example">Intro (Newton example):</h3>
|
||||||
|
<p>Newton example where we find the equations to describe a falling object using differential equations (DE’s)
|
||||||
|
We know $F=ma$
|
||||||
|
$F=m\frac{dv}{dt}=mg-kv$ <svg width="11px" height="10px" viewBox="0 0 11 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="left-arrow" transform="translate(5.500000, 5.000000) scale(-1, 1) translate(-5.500000, -5.000000) "> <path d="M1.77635684e-14,5 L9,5" id="rod" stroke="#000000" stroke-width="2"></path> <path d="M11,5 L6,0.5 L6,9.5 L11,5 Z" id="point" fill="#000000"></path></g></svg> we account for air resistance here. We can approximate the force of air resistance is proportional to the speed times a constant.
|
||||||
|
We can rearrange and solve it as it is a separable DE:
|
||||||
|
$\frac{dv}{mg-kv}=\frac{dt}{m}$
|
||||||
|
integrating both sides:
|
||||||
|
$\int \frac{dv}{mg-kv}=\frac{t}{m}+C$
|
||||||
|
let $u=mg-kv \quad du=-kdv$
|
||||||
|
$\int \frac{dv}{mg-kv}=\int \frac{du}{-k*u}=\frac{1}{-k}\ln\mid mg-kv\mid=\frac{t}{m}+C$
|
||||||
|
Very cool, but I want the velocity as a function of time, isolate v
|
||||||
|
$\ln\mid mg-kv\mid=-\frac{kt}{m}+C$
|
||||||
|
$\mid mg-kv\mid=e^{\frac{-kt}{m}+C}=e^{\frac{-kt}{m}}e^C$
|
||||||
|
$e^C$ is a + constant, the absolute value will multiply the inside expression by -1 when the inside is negative, so we can replace the $e^C$ constant with an arbitrary constant A that can be + or -
|
||||||
|
$mg-kv=Ae^{\frac{-kt}{m}}$
|
||||||
|
so, the general solution is $v(t)=\frac{1}{k}(mg-Ae^{\frac{-kt}{m}})$</p>
|
||||||
|
<h3 id="separable-de">Separable DE:</h3>
|
||||||
|
<pre><code>$\frac{dy}{dx}=f(y)g(x) \rightarrow \frac{dy}{f(y)}=g(x)dx\quad where\quad f(y)\ne0$
|
||||||
|
(I'm calling this <a class="hashtag" onclick="focusTag(this)">de_s_type1)</a>
|
||||||
|
</code></pre>
|
||||||
|
<p>ex: $\frac{dy}{dt}=\frac{1-t^2}{y^2}$
|
||||||
|
$y^2dy=dt(1-t^2)$
|
||||||
|
integrating both sides yields:
|
||||||
|
$\frac{y^3}{3}=t-\frac{t^3}{3}+C$
|
||||||
|
$y=(3t-t^3+C)^\frac{1}{3}$</p>
|
||||||
|
<h3 id="initial-value-problem-ivp">Initial value problem (IVP):</h3>
|
||||||
|
<pre><code>A Differential equation with provided initial conditions.
|
||||||
|
</code></pre>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">ex</a>
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">IVP</a> <a class="hashtag" onclick="focusTag(this)">de_s_type1</a>
|
||||||
|
ex: $\frac{dy}{dx}=2x\cos^2(y), \quad y(0)=\frac{\pi}{4}$
|
||||||
|
$\frac{dy}{\cos^2(y)}=2xdx$
|
||||||
|
integrate both sides yields:
|
||||||
|
$\int \frac{dy}{\cos^2(y)}=\tan(y)+C=x^2$
|
||||||
|
plug in $y(0)=\frac{\pi}{4}$
|
||||||
|
$\tan\left( \frac{\pi}{4} \right)+C=0$
|
||||||
|
$1+C=0$
|
||||||
|
$C=-1$
|
||||||
|
So, the answer is: $y=\arctan(x^2+1)$</p>
|
||||||
|
<p><a class="hashtag" onclick="focusTag(this)">end</a> of Lecture 1</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/lec-4.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/bernoulli-de-lec-3.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/homogenous-de-lec-2.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/linear-de-lec-23.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/seperable-de-lec-1.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/things-to-remember.html</loc>
|
||||||
|
<priority>0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>/tags.html</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
</urlset>
|
|
@ -0,0 +1,405 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="">
|
||||||
|
|
||||||
|
<link rel="alternate" type="application/rss+xml" href="./tags/index.xml" title="My New Hugo Site" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="Tags" />
|
||||||
|
<meta property="og:description" content="" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:url" content="/tags.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content="Tags"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title> - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1>Tags</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Tags on My New Hugo Site</title>
|
||||||
|
<link>/tags.html</link>
|
||||||
|
<description>Recent content in Tags on My New Hugo Site</description>
|
||||||
|
<generator>Hugo -- gohugo.io</generator>
|
||||||
|
<language>en-us</language><atom:link href="/tags/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,504 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="This is an incomplete list. I’m trying to add to it as I go.
|
||||||
|
everything with the #remember tag as well as the representations of the various DE, they start with #de_
|
||||||
|
Also remember the following:
|
||||||
|
derivatives of trigs
|
||||||
|
$\frac{d}{dx}\tan(x)=sec^2(x)$
|
||||||
|
$\frac{d}{dx}sec(x)=sec(x)\tan(x)$
|
||||||
|
… …">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="manifest" href="./manifest.json"><meta property="og:title" content="" />
|
||||||
|
<meta property="og:description" content="This is an incomplete list. I’m trying to add to it as I go.
|
||||||
|
everything with the #remember tag as well as the representations of the various DE, they start with #de_
|
||||||
|
Also remember the following:
|
||||||
|
derivatives of trigs $\frac{d}{dx}\tan(x)=sec^2(x)$ $\frac{d}{dx}sec(x)=sec(x)\tan(x)$ …
|
||||||
|
integrals of trigs $\int \tan(x) , dx=\ln\mid \sec(x)\mid+C$ $\int sec(x) , dx=\ln\mid sec(x)+\tan(x)\mid+C$ …
|
||||||
|
integration by parts LIATE -> log, inv trig, algebraic, trig, exp set u to the first in the list above $\int u(x)v'(x) , dx=uv-\int u'(x)v(x) , dx$" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="/things-to-remember.html" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:title" content=""/>
|
||||||
|
<meta name="twitter:description" content="This is an incomplete list. I’m trying to add to it as I go.
|
||||||
|
everything with the #remember tag as well as the representations of the various DE, they start with #de_
|
||||||
|
Also remember the following:
|
||||||
|
derivatives of trigs $\frac{d}{dx}\tan(x)=sec^2(x)$ $\frac{d}{dx}sec(x)=sec(x)\tan(x)$ …
|
||||||
|
integrals of trigs $\int \tan(x) , dx=\ln\mid \sec(x)\mid+C$ $\int sec(x) , dx=\ln\mid sec(x)+\tan(x)\mid+C$ …
|
||||||
|
integration by parts LIATE -> log, inv trig, algebraic, trig, exp set u to the first in the list above $\int u(x)v'(x) , dx=uv-\int u'(x)v(x) , dx$"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Things to remember - My New Hugo Site</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./css/main.min.203106d73d4370d04c60441691746dd8e021e38bbbc83f65f636dc8ae886a9f3.css" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="./js/main.min.2dd2f7073384163751d1886bcb921097bc2af8ec60cb37deebf49f61a0eca5c3.js" integrity="sha256-LdL3BzOEFjdR0Yhry5IQl7wq+Oxgyzfe6/SfYaDspcM="></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>This is an incomplete list. I’m trying to add to it as I go.</p>
|
||||||
|
<p>everything with the
|
||||||
|
<a class="hashtag" onclick="focusTag(this)">remember</a> tag as well as the representations of the various DE, they start with <a class=“hashtag” onclick=“focusTag(this)">de_</a></p>
|
||||||
|
<p>Also remember the following:</p>
|
||||||
|
<h2 id="derivatives-of-trigs">derivatives of trigs</h2>
|
||||||
|
<p>$\frac{d}{dx}\tan(x)=sec^2(x)$
|
||||||
|
$\frac{d}{dx}sec(x)=sec(x)\tan(x)$
|
||||||
|
…</p>
|
||||||
|
<h2 id="integrals-of-trigs">integrals of trigs</h2>
|
||||||
|
<p>$\int \tan(x) , dx=\ln\mid \sec(x)\mid+C$
|
||||||
|
$\int sec(x) , dx=\ln\mid sec(x)+\tan(x)\mid+C$
|
||||||
|
…</p>
|
||||||
|
<h2 id="integration-by-parts">integration by parts</h2>
|
||||||
|
<p>LIATE <svg width="11px" height="10px" viewBox="0 0 11 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><g id="right-arrow" ><path d="M1.77635684e-14,5 L9,5" id="rod" stroke="#000000" stroke-width="2" ></path><path d="M11,5 L6,0.5 L6,9.5 L11,5 Z" id="point" fill="#000000"></path></g></svg> log, inv trig, algebraic, trig, exp
|
||||||
|
set u to the first in the list above
|
||||||
|
$\int u(x)v'(x) , dx=uv-\int u'(x)v(x) , dx$</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Referenced in</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>No backlinks found</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,458 @@
|
||||||
|
@charset "UTF-8";
|
||||||
|
input {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font: inherit;
|
||||||
|
color: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline; }
|
||||||
|
|
||||||
|
*:focus {
|
||||||
|
outline: none; }
|
||||||
|
|
||||||
|
textarea,
|
||||||
|
input[type="search"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="button"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 0; }
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: var(--selected-text-background-color); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
Bear base styles
|
||||||
|
(Retrieved from official app, all credits belong to Bear Team)
|
||||||
|
*/
|
||||||
|
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline; }
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1; }
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
list-style: none; }
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0; }
|
||||||
|
|
||||||
|
caption, th, td {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: normal;
|
||||||
|
vertical-align: middle; }
|
||||||
|
|
||||||
|
q, blockquote {
|
||||||
|
quotes: none; }
|
||||||
|
|
||||||
|
q:before, q:after, blockquote:before, blockquote:after {
|
||||||
|
content: "";
|
||||||
|
content: none; }
|
||||||
|
|
||||||
|
a img {
|
||||||
|
border: none; }
|
||||||
|
|
||||||
|
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
* {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 87.5%;
|
||||||
|
line-height: 1.57143em; }
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6em;
|
||||||
|
-webkit-text-size-adjust: 100%; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
color: var(--text-base-color);
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
font-family: "AvenirNext-Regular"; }
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--link-text-color);
|
||||||
|
text-decoration: none; }
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.6em;
|
||||||
|
line-height: 1.3em;
|
||||||
|
margin-bottom: .78571em; }
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.3em;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-bottom: .62857em; }
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.15em;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-bottom: .47143em; }
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 1.57143em;
|
||||||
|
hyphens: auto; }
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
background-color: #dedede;
|
||||||
|
margin: -1px auto 1.57143em auto; }
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin-bottom: .31429em; }
|
||||||
|
|
||||||
|
ul ul, ul ol, ol ul, ol ol {
|
||||||
|
margin-bottom: 0px; }
|
||||||
|
|
||||||
|
ol {
|
||||||
|
counter-reset: ol_counter; }
|
||||||
|
|
||||||
|
ol li:before {
|
||||||
|
content: counter(ol_counter) ".";
|
||||||
|
counter-increment: ol_counter;
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 1em;
|
||||||
|
margin-right: 0.5em; }
|
||||||
|
|
||||||
|
b, strong {
|
||||||
|
font-family: "AvenirNext-Bold"; }
|
||||||
|
|
||||||
|
i, em {
|
||||||
|
font-family: "AvenirNext-Italic"; }
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: "Menlo-Regular"; }
|
||||||
|
|
||||||
|
.text-overflow-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap; }
|
||||||
|
|
||||||
|
.sf_code_string, .sf_code_selector, .sf_code_attr-name, .sf_code_char, .sf_code_builtin, .sf_code_inserted {
|
||||||
|
color: #D33905; }
|
||||||
|
|
||||||
|
.sf_code_comment, .sf_code_prolog, .sf_code_doctype, .sf_code_cdata {
|
||||||
|
color: #838383; }
|
||||||
|
|
||||||
|
.sf_code_number, .sf_code_boolean {
|
||||||
|
color: #0E73A2; }
|
||||||
|
|
||||||
|
.sf_code_keyword, .sf_code_atrule, .sf_code_rule, .sf_code_attr-value, .sf_code_function, .sf_code_class-name, .sf_code_class, .sf_code_regex, .sf_code_important, .sf_code_variable, .sf_code_interpolation {
|
||||||
|
color: #0E73A2; }
|
||||||
|
|
||||||
|
.sf_code_property, .sf_code_tag, .sf_code_constant, .sf_code_symbol, .sf_code_deleted {
|
||||||
|
color: #1B00CE; }
|
||||||
|
|
||||||
|
.sf_code_macro, .sf_code_entity, .sf_code_operator, .sf_code_url {
|
||||||
|
color: #920448; }
|
||||||
|
|
||||||
|
.note-wrapper {
|
||||||
|
max-width: 75em;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 1.57143em 3.14286em; }
|
||||||
|
|
||||||
|
.note-wrapper.spotlight-preview {
|
||||||
|
overflow-x: hidden; }
|
||||||
|
|
||||||
|
u {
|
||||||
|
text-decoration: none;
|
||||||
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, var(--accent-text-color) 50%);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-size: 2px 2px;
|
||||||
|
background-position: 0 1.05em; }
|
||||||
|
|
||||||
|
s {
|
||||||
|
color: #878787; }
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 0.1em; }
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin-bottom: 0.7em;
|
||||||
|
margin-top: 0.7em; }
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
text-indent: -0.35em; }
|
||||||
|
|
||||||
|
ul li:before {
|
||||||
|
content: "•";
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.3em; }
|
||||||
|
|
||||||
|
ul ul {
|
||||||
|
margin-left: 1.25714em; }
|
||||||
|
|
||||||
|
ol li {
|
||||||
|
text-indent: -1.45em; }
|
||||||
|
|
||||||
|
ol ol {
|
||||||
|
margin-left: 1.25714em; }
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
display: block;
|
||||||
|
margin-left: -1em;
|
||||||
|
padding-left: 0.8em;
|
||||||
|
border-left: 0.2em solid var(--accent-text-color); }
|
||||||
|
|
||||||
|
.todo-list ul {
|
||||||
|
margin-left: 1.88571em; }
|
||||||
|
|
||||||
|
.todo-list li {
|
||||||
|
text-indent: -1.75em; }
|
||||||
|
|
||||||
|
.todo-list li:before {
|
||||||
|
content: "";
|
||||||
|
display: static;
|
||||||
|
margin-right: 0px; }
|
||||||
|
|
||||||
|
.todo-checkbox {
|
||||||
|
text-indent: -1.7em; }
|
||||||
|
|
||||||
|
.todo-checkbox svg {
|
||||||
|
margin-right: 0.3em;
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em; }
|
||||||
|
|
||||||
|
.todo-checkbox svg #check {
|
||||||
|
display: none; }
|
||||||
|
|
||||||
|
.todo-checkbox.todo-checked #check {
|
||||||
|
display: inline; }
|
||||||
|
|
||||||
|
.todo-checkbox.todo-checked + .todo-text {
|
||||||
|
text-decoration: line-through;
|
||||||
|
color: #878787; }
|
||||||
|
|
||||||
|
.code-inline {
|
||||||
|
display: inline;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #dedede;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
font-size: 0.9em; }
|
||||||
|
|
||||||
|
.code-multiline {
|
||||||
|
display: block;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #dedede;
|
||||||
|
padding: 0.7em 1em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
overflow-x: auto; }
|
||||||
|
|
||||||
|
.hashtag {
|
||||||
|
display: inline-block;
|
||||||
|
color: var(--hashtag-text-color);
|
||||||
|
background: var(--hashtag-background-color);
|
||||||
|
padding: 0.0em 0.5em;
|
||||||
|
border-radius: 1em;
|
||||||
|
text-indent: 0; }
|
||||||
|
|
||||||
|
.hashtag a {
|
||||||
|
color: var(--hashtag-text-color); }
|
||||||
|
|
||||||
|
.address a {
|
||||||
|
color: #545454;
|
||||||
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, #0da35e 50%);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-size: 2px 2px;
|
||||||
|
background-position: 0 1.05em; }
|
||||||
|
|
||||||
|
.address svg {
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.2em; }
|
||||||
|
|
||||||
|
.color-preview {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
border: solid 1px rgba(0, 0, 0, 0.3);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 0.1em;
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em;
|
||||||
|
white-space: nowrap; }
|
||||||
|
|
||||||
|
.color-code {
|
||||||
|
margin-right: 0.2em;
|
||||||
|
font-family: "Menlo-Regular";
|
||||||
|
font-size: 0.9em; }
|
||||||
|
|
||||||
|
.color-hash {
|
||||||
|
opacity: 0.4; }
|
||||||
|
|
||||||
|
.ordered-list-number {
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 1em; }
|
||||||
|
|
||||||
|
.arrow svg {
|
||||||
|
position: relative;
|
||||||
|
top: 0.08em;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.15em;
|
||||||
|
margin-left: 0.15em; }
|
||||||
|
|
||||||
|
.arrow svg #rod {
|
||||||
|
stroke: #545454; }
|
||||||
|
|
||||||
|
.arrow svg #point {
|
||||||
|
fill: #545454; }
|
||||||
|
|
||||||
|
mark {
|
||||||
|
color: inherit;
|
||||||
|
display: inline;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
background-color: var(--highlighter-marker-color); }
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
Custom styles
|
||||||
|
*/
|
||||||
|
li > p {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 16px; }
|
||||||
|
|
||||||
|
hr {
|
||||||
|
background: var(--divider-color);
|
||||||
|
margin-top: 2.6em;
|
||||||
|
margin-bottom: 12px; }
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.05em;
|
||||||
|
margin-bottom: .47143em; }
|
||||||
|
|
||||||
|
* + p,
|
||||||
|
* + ul,
|
||||||
|
* + ol,
|
||||||
|
* + blockquote {
|
||||||
|
/*margin-top: 1.6em;*/ }
|
||||||
|
|
||||||
|
svg + ul,
|
||||||
|
svg + ol {
|
||||||
|
margin-top: 0; }
|
||||||
|
|
||||||
|
* + h2,
|
||||||
|
* + h3,
|
||||||
|
* + h4 {
|
||||||
|
margin-top: 2.8em; }
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
position: relative; }
|
||||||
|
|
||||||
|
h1:before,
|
||||||
|
h2:before,
|
||||||
|
h3:before,
|
||||||
|
h4:before,
|
||||||
|
h5:before,
|
||||||
|
h6:before {
|
||||||
|
position: absolute;
|
||||||
|
left: -2.2em;
|
||||||
|
color: var(--heading-indicator);
|
||||||
|
font-size: 12px; }
|
||||||
|
|
||||||
|
h1:before {
|
||||||
|
content: "H1"; }
|
||||||
|
|
||||||
|
h2:before {
|
||||||
|
content: "H2"; }
|
||||||
|
|
||||||
|
h3:before {
|
||||||
|
content: "H3"; }
|
||||||
|
|
||||||
|
h4:before {
|
||||||
|
content: "H4"; }
|
||||||
|
|
||||||
|
h5:before {
|
||||||
|
content: "H5"; }
|
||||||
|
|
||||||
|
h6:before {
|
||||||
|
content: "H6"; }
|
||||||
|
|
||||||
|
.note-wrapper {
|
||||||
|
margin-top: 2em; }
|
||||||
|
|
||||||
|
.highlighted {
|
||||||
|
background: var(--selected-text-background-color); }
|
||||||
|
|
||||||
|
.hashtag {
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 2px; }
|
||||||
|
|
||||||
|
.hashtag:before {
|
||||||
|
content: "#"; }
|
||||||
|
|
||||||
|
* + table {
|
||||||
|
margin-top: 12px; }
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-collapse: inherit;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%; }
|
||||||
|
|
||||||
|
table th {
|
||||||
|
font-family: "Avenir-Medium", "AvenirLTStd-Medium"; }
|
||||||
|
|
||||||
|
table td,
|
||||||
|
table th {
|
||||||
|
padding: 0.3em 0.8em; }
|
||||||
|
|
||||||
|
table tr:nth-child(odd) {
|
||||||
|
background-color: var(--selected-text-inactive-background-color); }
|
||||||
|
|
||||||
|
pre,
|
||||||
|
p code,
|
||||||
|
li code {
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: white;
|
||||||
|
overflow: hidden; }
|
||||||
|
|
||||||
|
li code,
|
||||||
|
p code {
|
||||||
|
padding: 2px; }
|
||||||
|
|
||||||
|
li img {
|
||||||
|
width: 122px; }
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover; }
|
||||||
|
|
||||||
|
.turbolinks-progress-bar {
|
||||||
|
visibility: hidden; }
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"css/style.css","MediaType":"text/css","Data":{}}
|
After Width: | Height: | Size: 579 KiB |
|
@ -0,0 +1,63 @@
|
||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/hugo,linux,macos
|
||||||
|
# Edit at https://www.gitignore.io/?templates=hugo,linux,macos
|
||||||
|
|
||||||
|
### Hugo ###
|
||||||
|
# Generated files by hugo
|
||||||
|
/public/
|
||||||
|
/resources/_gen/
|
||||||
|
|
||||||
|
# Executable may be added to repository
|
||||||
|
hugo.exe
|
||||||
|
hugo.darwin
|
||||||
|
hugo.linux
|
||||||
|
|
||||||
|
### Linux ###
|
||||||
|
*~
|
||||||
|
|
||||||
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder which might appear on any partition or disk
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
|
.nfs*
|
||||||
|
|
||||||
|
### macOS ###
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/hugo,linux,macos
|
||||||
|
|
||||||
|
|
||||||
|
/node_modules/
|
||||||
|
/public/build/
|
||||||
|
|
|
@ -0,0 +1,183 @@
|
||||||
|
|
||||||
|
# Bear notes Hugo theme
|
||||||
|
|
||||||
|
Online Zettelkasten/Digital garden [Hugo](https://gohugo.io/) theme.
|
||||||
|
|
||||||
|
### Sites using zettels
|
||||||
|
|
||||||
|
- https://dilrong.com
|
||||||
|
- https://digitalgarden.guidopercu.dev/
|
||||||
|
- https://notas.cristian.lat
|
||||||
|
|
||||||
|
![Screenshot1](screenshot1.png)
|
||||||
|
![Screenshot2](screenshot2.png)
|
||||||
|
|
||||||
|
### 💻 Installing & running
|
||||||
|
|
||||||
|
On your `config.toml`, set the theme as follows: theme = `"github.com/crisrojas/zettels"`, alternative you could just `git clone` this repo inside the "themes" folder or submodule it with `git submodule`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule add https://github.com/crisrojas/zettels.git themes/zettels
|
||||||
|
```
|
||||||
|
|
||||||
|
From bear, export your notes as markdown into the content folder.
|
||||||
|
You'll also need to put there an _index.md file. This will be the webiste entry point.
|
||||||
|
|
||||||
|
To make things easier you could use one of this tools:
|
||||||
|
|
||||||
|
- [Bear Markdown Export](https://github.com/andymatuschak/Bear-Markdown-Export)
|
||||||
|
- [Bhugo](https://github.com/Zach-Johnson/bhugo/blob/master/main.go) (Be aware that native Hugo tags aren't supported yet)
|
||||||
|
- [Bear markdown images fixer script](https://gist.github.com/crisrojas/6662f9fc78a99dc56c2c268a713a60ee) (please, make a backup before running the script)
|
||||||
|
|
||||||
|
Run with `hugo server --disableFastRender` , this will avoid a weird bug that I've not tracked yet (content being rendered multiple times)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚙️ Config file
|
||||||
|
|
||||||
|
This is the `config.toml` [I'm using for publishing my notes](https://notas.cristian.lat).
|
||||||
|
|
||||||
|
I'll add more details about usage in the future. For now you can copy-paste and replace the variables to fit your needs.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```toml
|
||||||
|
languageCode = "es-ES"
|
||||||
|
title = "Notas"
|
||||||
|
uglyURLS = true
|
||||||
|
|
||||||
|
relativeURLs = true
|
||||||
|
|
||||||
|
publishDir = "public"
|
||||||
|
pygmentsUseClasses = true
|
||||||
|
|
||||||
|
assetDir = "themes/zettels/assets"
|
||||||
|
|
||||||
|
DefaultContentLanguage = "es"
|
||||||
|
|
||||||
|
theme = "zettels"
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = ["HTML", "JSON"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
theme = "duotone-light"
|
||||||
|
bear = true
|
||||||
|
favicon = "favicon.ico"
|
||||||
|
author = "Cristian Rojas"
|
||||||
|
|
||||||
|
# Enable tags.
|
||||||
|
[taxonomies]
|
||||||
|
tag = "tags"
|
||||||
|
|
||||||
|
|
||||||
|
# Allows rendering the html inside markdown
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe= true
|
||||||
|
```
|
||||||
|
|
||||||
|
> ℹ bear = true uses filename as a title on the frontend instead the title yaml property.
|
||||||
|
|
||||||
|
### 🎨 Themes
|
||||||
|
|
||||||
|
On your config file, pass the chosen theme as a parameter:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[params]
|
||||||
|
theme = "duotone-light"
|
||||||
|
```
|
||||||
|
|
||||||
|
You can chose between *duotone-light* and *red-graphite*.
|
||||||
|
|
||||||
|
More Bear themes will be added in the future.
|
||||||
|
|
||||||
|
### 🌎 Language
|
||||||
|
|
||||||
|
On your config file, pass the chosen language as a parameter:
|
||||||
|
|
||||||
|
```tom
|
||||||
|
DefaultContentLanguage = "es"
|
||||||
|
```
|
||||||
|
|
||||||
|
Languages available: Spanish ("es"), English ("en"), French ("fr")
|
||||||
|
|
||||||
|
### 🔗 Linking notes
|
||||||
|
|
||||||
|
Linking is done through double-brackets syntax.
|
||||||
|
|
||||||
|
Ex.: `[[wikilink]]`, where "wikilink" is the filename of the note to be linked.
|
||||||
|
|
||||||
|
I'll maybe add a feature to allow choosing linking from note's title instead of filename.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- Input -->
|
||||||
|
[[biology]]
|
||||||
|
<!-- Regex looks for markdown file... -->
|
||||||
|
biology.md
|
||||||
|
<!-- Output html -->
|
||||||
|
<a href="biology.html">biology</a>
|
||||||
|
```
|
||||||
|
|
||||||
|
Spaces in wikilinks are supported: `[[spaced link]]` outputs `<a href="spaced-link.html">spaced link</a>`
|
||||||
|
|
||||||
|
### 🔙 Backlinks
|
||||||
|
|
||||||
|
Backlinks are supported. Example → [here](https://notas.cristian.lat/empieza-haciendo-lo-que-sea-necesario-despu%C3%A9s-haz-lo-que-sea-posible-sin-darte-cuenta-y-al-cabo-de-un-tiempo-estar%C3%A1s-haciendo-lo-imposible.html)
|
||||||
|
|
||||||
|
### Nested tags
|
||||||
|
|
||||||
|
Nested tags inside note content are rendered. Expect some errors on tricky cases.
|
||||||
|
|
||||||
|
### UI/UX
|
||||||
|
|
||||||
|
If you're thinking this obviously looks a little too much like Bear, you're right.
|
||||||
|
|
||||||
|
This is not coincidental. The reasons are basically:
|
||||||
|
|
||||||
|
- I ❤️ 🐻
|
||||||
|
- [I've tried before](https://5fbd3f8577526e0008aeee8b--zkcrisrojas.netlify.app/notes) to implement a good navigational UI for an online zettelkasten. I failed.
|
||||||
|
- Bear interface has been already polished from trial and error. No need to reinvent the wheel.
|
||||||
|
- I wanted a tool to publish my Bear notes and also wanted to "feel at home" when navigating.
|
||||||
|
- Not having to worry about design decisions boosts dev speed.
|
||||||
|
|
||||||
|
|
||||||
|
### Shortcuts
|
||||||
|
|
||||||
|
To open index/search hit:
|
||||||
|
|
||||||
|
- <svg style="margin-right:5px" xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24"><path d="M0 12v-8.646l10-1.355v10.001h-10zm11 0h13v-12l-13 1.807v10.193zm-1 1h-10v7.646l10 1.355v-9.001zm1 0v9.194l13 1.806v-11h-13z"/></svg> ` Ctr` + `K`
|
||||||
|
- `Cmd` + `K`
|
||||||
|
|
||||||
|
### 🚧 toDo
|
||||||
|
|
||||||
|
- Adding more themes
|
||||||
|
- Allow custom CSS?
|
||||||
|
- Escape wikilinks inside inline code blocks
|
||||||
|
- Correct tag regex for special cases and add unit tests for both, wiki-regex and tag-regex.
|
||||||
|
- Create quickstart repo and add Netlify deploy button.
|
||||||
|
- 🇪🇸 → 🇬🇧: Change "privado" tag finder to "private-note"
|
||||||
|
- Integrate an image zoom library?
|
||||||
|
- Side menu: toDos, private notes, tag list, etc...
|
||||||
|
- Thumbnails on search component (from now we're loading the first image of each note from the very beginning without any kind of optimization)
|
||||||
|
- Lazy load those thumbnails
|
||||||
|
- Add support for Hugo tags (yaml)
|
||||||
|
- Add [[links to/headings]] support. See [this hugo thread](https://discourse.gohugo.io/t/support-wiki-internal-link-converson-to-relref-shortcode/6074) for an idea of the regex implementation
|
||||||
|
- Add Zettels to the [Hugo theme repository](https://github.com/gohugoio/hugoThemes)
|
||||||
|
- Integrate [slideout js](https://slideout.js.org)
|
||||||
|
|
||||||
|
### Done
|
||||||
|
|
||||||
|
- <s>Allow choosing themes from config file</s>
|
||||||
|
- <s>Bear highlight regex: `==highlighted==` && `::highlighted::`</s>
|
||||||
|
- <s>Code blocks</s>
|
||||||
|
- <s>find a way to localize theme strings.</s>
|
||||||
|
- <s>🐻 Bear alike search sidebar</s>
|
||||||
|
- <s>Polar Markup support?</s> (Nope → [It will be deprecated](https://www.reddit.com/r/bearapp/comments/n73akc/new_to_bear_markdown_comparability_mode_or_not/gxuj81r?utm_source=share&utm_medium=web2x&context=3))
|
||||||
|
|
||||||
|
### Maybe one day/ Nice to have
|
||||||
|
|
||||||
|
- Theme selector from the frontend
|
||||||
|
- Dark theme detector from OS settings?
|
||||||
|
- Obsidian alike nodes graph
|
||||||
|
- Bear alike nested tag list
|
||||||
|
- Port frontend to a more [SPA alike tech](https://svelte.dev)
|
||||||
|
- SSG from Bear SQLite database ([wip?](https://github.com/crisrojas/miyanoSwift.git))
|
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
|
@ -0,0 +1,567 @@
|
||||||
|
|
||||||
|
input {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font: inherit;
|
||||||
|
color: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline
|
||||||
|
}
|
||||||
|
|
||||||
|
*:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea,
|
||||||
|
input[type="search"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="button"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
// @todo: class
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: var(--selected-text-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Bear base styles
|
||||||
|
(Retrieved from official app, all credits belong to Bear Team)
|
||||||
|
*/
|
||||||
|
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
list-style: none
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
caption, th, td {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: normal;
|
||||||
|
vertical-align: middle
|
||||||
|
}
|
||||||
|
|
||||||
|
q, blockquote {
|
||||||
|
quotes: none
|
||||||
|
}
|
||||||
|
|
||||||
|
q:before, q:after, blockquote:before, blockquote:after {
|
||||||
|
content: "";
|
||||||
|
content: none
|
||||||
|
}
|
||||||
|
|
||||||
|
a img {
|
||||||
|
border: none
|
||||||
|
}
|
||||||
|
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
|
||||||
|
display: block
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 87.5%;
|
||||||
|
line-height: 1.57143em
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6em;
|
||||||
|
-webkit-text-size-adjust: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
// @todo: not working
|
||||||
|
color: var(--text-base-color);
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
font-family: "AvenirNext-Regular"
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--link-text-color);
|
||||||
|
text-decoration: none
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.6em;
|
||||||
|
line-height: 1.3em;
|
||||||
|
margin-bottom: .78571em
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.3em;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-bottom: .62857em
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.15em;
|
||||||
|
line-height: 1em;
|
||||||
|
margin-bottom: .47143em
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 1.57143em;
|
||||||
|
hyphens: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
background-color: #dedede;
|
||||||
|
margin: -1px auto 1.57143em auto
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin-bottom: .31429em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul ul, ul ol, ol ul, ol ol {
|
||||||
|
margin-bottom: 0px
|
||||||
|
}
|
||||||
|
|
||||||
|
ol {
|
||||||
|
counter-reset: ol_counter
|
||||||
|
}
|
||||||
|
|
||||||
|
ol li:before {
|
||||||
|
content: counter(ol_counter) ".";
|
||||||
|
counter-increment: ol_counter;
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 1em;
|
||||||
|
margin-right: 0.5em
|
||||||
|
}
|
||||||
|
|
||||||
|
b, strong {
|
||||||
|
font-family: "AvenirNext-Bold"
|
||||||
|
}
|
||||||
|
|
||||||
|
i, em {
|
||||||
|
font-family: "AvenirNext-Italic"
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: "Menlo-Regular"
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-overflow-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_string, .sf_code_selector, .sf_code_attr-name, .sf_code_char, .sf_code_builtin, .sf_code_inserted {
|
||||||
|
color: #D33905
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_comment, .sf_code_prolog, .sf_code_doctype, .sf_code_cdata {
|
||||||
|
color: #838383
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_number, .sf_code_boolean {
|
||||||
|
color: #0E73A2
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_keyword, .sf_code_atrule, .sf_code_rule, .sf_code_attr-value, .sf_code_function, .sf_code_class-name, .sf_code_class, .sf_code_regex, .sf_code_important, .sf_code_variable, .sf_code_interpolation {
|
||||||
|
color: #0E73A2
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_property, .sf_code_tag, .sf_code_constant, .sf_code_symbol, .sf_code_deleted {
|
||||||
|
color: #1B00CE
|
||||||
|
}
|
||||||
|
|
||||||
|
.sf_code_macro, .sf_code_entity, .sf_code_operator, .sf_code_url {
|
||||||
|
color: #920448
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-wrapper {
|
||||||
|
max-width: 75em;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 1.57143em 3.14286em
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-wrapper.spotlight-preview {
|
||||||
|
overflow-x: hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
u {
|
||||||
|
text-decoration: none;
|
||||||
|
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%,var(--accent-text-color) 50%);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-size: 2px 2px;
|
||||||
|
background-position: 0 1.05em
|
||||||
|
}
|
||||||
|
|
||||||
|
s {
|
||||||
|
color: #878787
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 0.1em
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin-bottom: 0.7em;
|
||||||
|
margin-top: 0.7em
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
text-indent: -0.35em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li:before {
|
||||||
|
content: "•";
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.3em
|
||||||
|
}
|
||||||
|
|
||||||
|
ul ul {
|
||||||
|
margin-left: 1.25714em
|
||||||
|
}
|
||||||
|
|
||||||
|
ol li {
|
||||||
|
text-indent: -1.45em
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol {
|
||||||
|
margin-left: 1.25714em
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
display: block;
|
||||||
|
margin-left: -1em;
|
||||||
|
padding-left: 0.8em;
|
||||||
|
border-left: 0.2em solid var(--accent-text-color)
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-list ul {
|
||||||
|
margin-left: 1.88571em
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-list li {
|
||||||
|
text-indent: -1.75em
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-list li:before {
|
||||||
|
content: "";
|
||||||
|
display: static;
|
||||||
|
margin-right: 0px
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-checkbox {
|
||||||
|
text-indent: -1.7em
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-checkbox svg {
|
||||||
|
margin-right: 0.3em;
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-checkbox svg #check {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-checkbox.todo-checked #check {
|
||||||
|
display: inline
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo-checkbox.todo-checked+.todo-text {
|
||||||
|
text-decoration: line-through;
|
||||||
|
color: #878787
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-inline {
|
||||||
|
display: inline;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #dedede;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
font-size: 0.9em
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-multiline {
|
||||||
|
display: block;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #dedede;
|
||||||
|
padding: 0.7em 1em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
overflow-x: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.hashtag {
|
||||||
|
display: inline-block;
|
||||||
|
color: var(--hashtag-text-color);
|
||||||
|
background: var(--hashtag-background-color);
|
||||||
|
padding: 0.0em 0.5em;
|
||||||
|
border-radius: 1em;
|
||||||
|
text-indent: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.hashtag a {
|
||||||
|
color: var(--hashtag-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.address a {
|
||||||
|
color: #545454;
|
||||||
|
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%,#0da35e 50%);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-size: 2px 2px;
|
||||||
|
background-position: 0 1.05em
|
||||||
|
}
|
||||||
|
|
||||||
|
.address svg {
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.2em
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-preview {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
border: solid 1px rgba(0,0,0,0.3);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 0.1em;
|
||||||
|
position: relative;
|
||||||
|
top: 0.2em;
|
||||||
|
white-space: nowrap
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-code {
|
||||||
|
margin-right: 0.2em;
|
||||||
|
font-family: "Menlo-Regular";
|
||||||
|
font-size: 0.9em
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-hash {
|
||||||
|
opacity: 0.4
|
||||||
|
}
|
||||||
|
|
||||||
|
.ordered-list-number {
|
||||||
|
color: var(--accent-text-color);
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow svg {
|
||||||
|
position: relative;
|
||||||
|
top: 0.08em;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.15em;
|
||||||
|
margin-left: 0.15em
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow svg #rod {
|
||||||
|
stroke: #545454
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow svg #point {
|
||||||
|
fill: #545454
|
||||||
|
}
|
||||||
|
|
||||||
|
mark {
|
||||||
|
color: inherit;
|
||||||
|
display: inline;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
background-color: var(--highlighter-marker-color)
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Custom styles
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Hugo renders footnotes with <p> tags nested inside <li>
|
||||||
|
// This is need to prevent <p> breaking lines
|
||||||
|
li > p {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
background: var(--divider-color);
|
||||||
|
margin-top: 2.6em;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-family: "AvenirNext-Medium";
|
||||||
|
color: var(--title-text-color);
|
||||||
|
font-size: 1.05em;
|
||||||
|
margin-bottom: .47143em
|
||||||
|
}
|
||||||
|
|
||||||
|
* + p,
|
||||||
|
* + ul,
|
||||||
|
* + ol,
|
||||||
|
* + blockquote {
|
||||||
|
/*margin-top: 1.6em;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
svg + ul,
|
||||||
|
svg + ol {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
* + h2,
|
||||||
|
* + h3,
|
||||||
|
* + h4 {
|
||||||
|
margin-top: 2.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:before,
|
||||||
|
h2:before,
|
||||||
|
h3:before,
|
||||||
|
h4:before,
|
||||||
|
h5:before,
|
||||||
|
h6:before {
|
||||||
|
position: absolute;
|
||||||
|
left: -2.2em;
|
||||||
|
color: var(--heading-indicator);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:before {
|
||||||
|
content: "H1"
|
||||||
|
}
|
||||||
|
|
||||||
|
h2:before {
|
||||||
|
content: "H2"
|
||||||
|
}
|
||||||
|
|
||||||
|
h3:before {
|
||||||
|
content: "H3"
|
||||||
|
}
|
||||||
|
|
||||||
|
h4:before {
|
||||||
|
content: "H4"
|
||||||
|
}
|
||||||
|
|
||||||
|
h5:before {
|
||||||
|
content: "H5"
|
||||||
|
}
|
||||||
|
|
||||||
|
h6:before {
|
||||||
|
content: "H6"
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-wrapper {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlighted {
|
||||||
|
background: var(--selected-text-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hashtag {
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hashtag:before {
|
||||||
|
content: "#"
|
||||||
|
}
|
||||||
|
|
||||||
|
* + table {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-collapse: inherit;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
font-family: "Avenir-Medium", "AvenirLTStd-Medium";
|
||||||
|
}
|
||||||
|
|
||||||
|
table td,
|
||||||
|
table th {
|
||||||
|
padding: 0.3em 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:nth-child(odd) {
|
||||||
|
background-color: var(--selected-text-inactive-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// table td:nth-child(odd),
|
||||||
|
// table th:nth-child(odd) {
|
||||||
|
// border-right: 1px solid #e4e5e6;
|
||||||
|
// }
|
||||||
|
|
||||||
|
pre,
|
||||||
|
p code,
|
||||||
|
li code {
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: white;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
li code,
|
||||||
|
p code {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li img {
|
||||||
|
width: 122px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.turbolinks-progress-bar {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
:root {
|
||||||
|
--background: rgba(250, 248, 245, 1.0);
|
||||||
|
--background-search: rgba(250, 248, 245, 1.0);
|
||||||
|
--text-base-color: rgba(75, 53, 8, 1.00);
|
||||||
|
--title-text-color: rgba(99, 90, 71, 1.00);
|
||||||
|
--link-text-color: rgba(11, 53, 135, 1.0);
|
||||||
|
--accent-text-color: rgba(115, 144, 201, 1.0);
|
||||||
|
--selected-text-background-color: rgba(184, 133, 80, 0.32);
|
||||||
|
|
||||||
|
--hashtag-text-color: rgba(255, 255, 255, 1.0);
|
||||||
|
--hashtag-marker-text-color: rgba(255, 255, 255, 1.0);
|
||||||
|
--hashtag-background-color: rgba(174, 147, 101, 0.7);
|
||||||
|
--highlighter-marker-color: rgba(211, 255, 164, 1.00);
|
||||||
|
|
||||||
|
--separator-color: rgba(233, 225, 211, 1.0);
|
||||||
|
--note-table-cell-selected-color: rgba(244, 235, 221, 1.00);
|
||||||
|
--note-table-cell-ribbon-color: rgba(175, 148, 101, 1.00);
|
||||||
|
|
||||||
|
/* --heading-indicator: #B4B4B4; */
|
||||||
|
--dark-background-color: rgba(66, 35, 13, 1.00);
|
||||||
|
--search-field-focused-color: #80ABD9;
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
:root {
|
||||||
|
--background: #FBFBFB;
|
||||||
|
--background-search: #FBFBFB;
|
||||||
|
--text-base-color: #545454;
|
||||||
|
--title-text-color: #333;
|
||||||
|
--link-text-color: #de4c4f;
|
||||||
|
--accent-text-color: #e06e73;
|
||||||
|
--selected-text-background-color: #DEDEDE;
|
||||||
|
|
||||||
|
--hashtag-text-color: rgba(255, 255, 255, 1.0);
|
||||||
|
--hashtag-marker-text-color: rgba(255, 255, 255, 1.0);
|
||||||
|
--hashtag-background-color: #b8bfc2;
|
||||||
|
--highlighter-marker-color: rgba(211, 255, 164, 1.00);
|
||||||
|
|
||||||
|
--separator-color: #DEDEDE;
|
||||||
|
--note-table-cell-selected-color: #fff;
|
||||||
|
--note-table-cell-ribbon-color: #e06e73;
|
||||||
|
|
||||||
|
--heading-indicator: #B4B4B4;
|
||||||
|
--dark-background-color: #2E3235;
|
||||||
|
--search-field-focused-color: #80ABD9;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
/* Background */ .chroma { color: #42486D; background-color: white
|
||||||
|
}
|
||||||
|
/* Other */ .chroma .x { }
|
||||||
|
/* Error */ .chroma .err { }
|
||||||
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
||||||
|
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
|
||||||
|
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* Keyword */ .chroma .k { color: #EE8A87 }
|
||||||
|
/* KeywordConstant */ .chroma .kc { color: #EE8A87 }
|
||||||
|
/* KeywordDeclaration */ .chroma .kd { color: #6974DD; font-weight: bold; }
|
||||||
|
/* KeywordNamespace */ .chroma .kn { color: #EE8A87 }
|
||||||
|
/* KeywordPseudo */ .chroma .kp { color: #EE8A87 }
|
||||||
|
/* KeywordReserved */ .chroma .kr { color: #6974DD; font-weight: bold; }
|
||||||
|
/* KeywordType */ .chroma .kt { color: #6974DD;font-weight: bold; }
|
||||||
|
/* Name */ .chroma .n { color: #42486D; }
|
||||||
|
/* NameAttribute */ .chroma .na { color: #e7b70a
|
||||||
|
}
|
||||||
|
/* NameBuiltin */ .chroma .nb { color: #6974DD; font-style: italic }
|
||||||
|
/* NameBuiltinPseudo */ .chroma .bp { }
|
||||||
|
/* NameClass */ .chroma .nc { color: #e7b70a }
|
||||||
|
/* NameConstant */ .chroma .no { }
|
||||||
|
/* NameDecorator */ .chroma .nd { }
|
||||||
|
/* NameEntity */ .chroma .ni { }
|
||||||
|
/* NameException */ .chroma .ne { }
|
||||||
|
/* NameFunction */ .chroma .nf { color: #4090cc;font-weight: bold; }
|
||||||
|
/* NameFunctionMagic */ .chroma .fm { }
|
||||||
|
/* NameLabel */ .chroma .nl { color: #6974DD; font-style: italic }
|
||||||
|
/* NameNamespace */ .chroma .nn { }
|
||||||
|
/* NameOther */ .chroma .nx { }
|
||||||
|
/* NameProperty */ .chroma .py { }
|
||||||
|
/* NameTag */ .chroma .nt { color: #EE8A87 }
|
||||||
|
/* NameVariable */ .chroma .nv { color: #42486d; }
|
||||||
|
/* NameVariableClass */ .chroma .vc { color: #6974DD; font-style: italic }
|
||||||
|
/* NameVariableGlobal */ .chroma .vg { color: #6974DD; font-style: italic }
|
||||||
|
/* NameVariableInstance */ .chroma .vi { color: #6974DD; font-style: italic }
|
||||||
|
/* NameVariableMagic */ .chroma .vm { }
|
||||||
|
/* Literal */ .chroma .l { }
|
||||||
|
/* LiteralDate */ .chroma .ld { }
|
||||||
|
/* LiteralString */ .chroma .s { color: #4A9777 }
|
||||||
|
/* LiteralStringAffix */ .chroma .sa { color: #4A9777 }
|
||||||
|
/* LiteralStringBacktick */ .chroma .sb { color: #4A9777 }
|
||||||
|
/* LiteralStringChar */ .chroma .sc { color: #4A9777 }
|
||||||
|
/* LiteralStringDelimiter */ .chroma .dl { color: #4A9777 }
|
||||||
|
/* LiteralStringDoc */ .chroma .sd { color: #4A9777 }
|
||||||
|
/* LiteralStringDouble */ .chroma .s2 { color: #4A9777 }
|
||||||
|
/* LiteralStringEscape */ .chroma .se { color: #4A9777 }
|
||||||
|
/* LiteralStringHeredoc */ .chroma .sh { color: #4A9777 }
|
||||||
|
/* LiteralStringInterpol */ .chroma .si { color: #4A9777 }
|
||||||
|
/* LiteralStringOther */ .chroma .sx { color: #4A9777 }
|
||||||
|
/* LiteralStringRegex */ .chroma .sr { color: #4A9777 }
|
||||||
|
/* LiteralStringSingle */ .chroma .s1 { color: #4A9777 }
|
||||||
|
/* LiteralStringSymbol */ .chroma .ss { color: #4A9777 }
|
||||||
|
/* LiteralNumber */ .chroma .m { color: #EA846A }
|
||||||
|
/* LiteralNumberBin */ .chroma .mb { color: #EA846A }
|
||||||
|
/* LiteralNumberFloat */ .chroma .mf { color: #EA846A }
|
||||||
|
/* LiteralNumberHex */ .chroma .mh { color: #EA846A }
|
||||||
|
/* LiteralNumberInteger */ .chroma .mi { color: #EA846A }
|
||||||
|
/* LiteralNumberIntegerLong */ .chroma .il { color: #EA846A }
|
||||||
|
/* LiteralNumberOct */ .chroma .mo { color: #EA846A }
|
||||||
|
/* Operator */ .chroma .o { color: #4090CC }
|
||||||
|
/* OperatorWord */ .chroma .ow { color: #EE8A87 }
|
||||||
|
/* Punctuation */ .chroma .p {color: #4090CC;}
|
||||||
|
/* Comment */ .chroma .c { color: #95A2AF }
|
||||||
|
/* CommentHashbang */ .chroma .ch { color: #95A2AF }
|
||||||
|
/* CommentMultiline */ .chroma .cm { color: #95A2AF }
|
||||||
|
/* CommentSingle */ .chroma .c1 { color: #95A2AF }
|
||||||
|
/* CommentSpecial */ .chroma .cs { color: #95A2AF }
|
||||||
|
/* CommentPreproc */ .chroma .cp { color: #EE8A87 }
|
||||||
|
/* CommentPreprocFile */ .chroma .cpf { color: #EE8A87 }
|
||||||
|
/* Generic */ .chroma .g { }
|
||||||
|
/* GenericDeleted */ .chroma .gd { color: #8b080b }
|
||||||
|
/* GenericEmph */ .chroma .ge { text-decoration: underline }
|
||||||
|
/* GenericError */ .chroma .gr { }
|
||||||
|
/* GenericHeading */ .chroma .gh { font-weight: bold }
|
||||||
|
/* GenericInserted */ .chroma .gi { font-weight: bold }
|
||||||
|
/* GenericOutput */ .chroma .go { color: #44475a }
|
||||||
|
/* GenericPrompt */ .chroma .gp { }
|
||||||
|
/* GenericStrong */ .chroma .gs { }
|
||||||
|
/* GenericSubheading */ .chroma .gu { font-weight: bold }
|
||||||
|
/* GenericTraceback */ .chroma .gt { }
|
||||||
|
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
||||||
|
/* Text */ .chroma { }
|
||||||
|
/* TextWhitespace */ .chroma .w { }
|
After Width: | Height: | Size: 98 KiB |
|
@ -0,0 +1,733 @@
|
||||||
|
/*!
|
||||||
|
*
|
||||||
|
* jQuery collagePlus Plugin v0.3.3
|
||||||
|
* https://github.com/ed-lea/jquery-collagePlus
|
||||||
|
*
|
||||||
|
* Copyright 2012, Ed Lea twitter.com/ed_lea
|
||||||
|
*
|
||||||
|
* built for http://qiip.me
|
||||||
|
*
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
* http://www.opensource.org/licenses/GPL-2.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;(function( $ ) {
|
||||||
|
|
||||||
|
|
||||||
|
$.fn.collagePlus = function( options ) {
|
||||||
|
|
||||||
|
return this.each(function() {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* set up vars
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// track row width by adding images, padding and css borders etc
|
||||||
|
var row = 0,
|
||||||
|
// collect elements to be re-sized in current row
|
||||||
|
elements = [],
|
||||||
|
// track the number of rows generated
|
||||||
|
rownum = 1,
|
||||||
|
// needed for creating some additional defaults that are actually obtained
|
||||||
|
// from the dom, which maybe doesn't make them defaults ?!
|
||||||
|
$this = $(this);
|
||||||
|
|
||||||
|
|
||||||
|
// width of the area the collage will be in
|
||||||
|
$.fn.collagePlus.defaults.albumWidth = $this.width();
|
||||||
|
// padding between the images. Using padding left as we assume padding is even all the way round
|
||||||
|
$.fn.collagePlus.defaults.padding = parseFloat( $this.css('padding-left') );
|
||||||
|
// object that contains the images to collage
|
||||||
|
$.fn.collagePlus.defaults.images = $this.children();
|
||||||
|
|
||||||
|
var settings = $.extend({}, $.fn.collagePlus.defaults, options);
|
||||||
|
|
||||||
|
settings.images.each(
|
||||||
|
function(index){
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Cache selector
|
||||||
|
* Even if first child is not an image the whole sizing is based on images
|
||||||
|
* so where we take measurements, we take them on the images
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var $this = $(this),
|
||||||
|
$img = ($this.is("img")) ? $this : $(this).find("img");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* get the current image size. Get image size in this order
|
||||||
|
*
|
||||||
|
* 1. from <img> tag
|
||||||
|
* 2. from data set from initial calculation
|
||||||
|
* 3. after loading the image and checking it's actual size
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var w = (typeof $img.data("width") != 'undefined') ? $img.data("width") : $img.width(),
|
||||||
|
h = (typeof $img.data("height") != 'undefined') ? $img.data("height") : $img.height();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Get any current additional properties that may affect the width or height
|
||||||
|
* like css borders for example
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var imgParams = getImgProperty($img);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* store the original size for resize events
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$img.data("width", w);
|
||||||
|
$img.data("height", h);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* calculate the w/h based on target height
|
||||||
|
* this is our ideal size, but later we'll resize to make it fit
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var nw = Math.ceil(w/h*settings.targetHeight),
|
||||||
|
nh = Math.ceil(settings.targetHeight);
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Keep track of which images are in our row so far
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
elements.push([this, nw, nh, imgParams['w'], imgParams['h']]);
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* calculate the width of the element including extra properties
|
||||||
|
* like css borders
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
row += nw + imgParams['w'] + settings.padding;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* if the current row width is wider than the parent container
|
||||||
|
* it's time to make a row out of our images
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if( row > settings.albumWidth && elements.length != 0 ){
|
||||||
|
|
||||||
|
// call the method that calculates the final image sizes
|
||||||
|
// remove one set of padding as it's not needed for the last image in the row
|
||||||
|
resizeRow(elements, (row - settings.padding), settings, rownum);
|
||||||
|
|
||||||
|
// reset our row
|
||||||
|
delete row;
|
||||||
|
delete elements;
|
||||||
|
row = 0;
|
||||||
|
elements = [];
|
||||||
|
rownum += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* if the images left are not enough to make a row
|
||||||
|
* then we'll force them to make one anyway
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if ( settings.images.length-1 == index && elements.length != 0){
|
||||||
|
resizeRow(elements, row, settings, rownum);
|
||||||
|
|
||||||
|
// reset our row
|
||||||
|
delete row;
|
||||||
|
delete elements;
|
||||||
|
row = 0;
|
||||||
|
elements = [];
|
||||||
|
rownum += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function resizeRow( obj, row, settings, rownum) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* How much bigger is this row than the available space?
|
||||||
|
* At this point we have adjusted the images height to fit our target height
|
||||||
|
* so the image size will already be different from the original.
|
||||||
|
* The resizing we're doing here is to adjust it to the album width.
|
||||||
|
*
|
||||||
|
* We also need to change the album width (basically available space) by
|
||||||
|
* the amount of padding and css borders for the images otherwise
|
||||||
|
* this will skew the result.
|
||||||
|
*
|
||||||
|
* This is because padding and borders remain at a fixed size and we only
|
||||||
|
* need to scale the images.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var imageExtras = (settings.padding * (obj.length - 1)) + (obj.length * obj[0][3]),
|
||||||
|
albumWidthAdjusted = settings.albumWidth - imageExtras,
|
||||||
|
overPercent = albumWidthAdjusted / (row - imageExtras),
|
||||||
|
// start tracking our width with know values that will make up the total width
|
||||||
|
// like borders and padding
|
||||||
|
trackWidth = imageExtras,
|
||||||
|
// guess whether this is the last row in a set by checking if the width is less
|
||||||
|
// than the parent width.
|
||||||
|
lastRow = (row < settings.albumWidth ? true : false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resize the images by the above % so that they'll fit in the album space
|
||||||
|
*/
|
||||||
|
for (var i = 0; i < obj.length; i++) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var $obj = $(obj[i][0]),
|
||||||
|
fw = Math.floor(obj[i][1] * overPercent),
|
||||||
|
fh = Math.floor(obj[i][2] * overPercent),
|
||||||
|
// if the element is the last in the row,
|
||||||
|
// don't apply right hand padding (this is our flag for later)
|
||||||
|
isNotLast = !!(( i < obj.length - 1 ));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Checking if the user wants to not stretch the images of the last row to fit the
|
||||||
|
* parent element size
|
||||||
|
*/
|
||||||
|
if(settings.allowPartialLastRow === true && lastRow === true){
|
||||||
|
fw = obj[i][1];
|
||||||
|
fh = obj[i][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Because we use % to calculate the widths, it's possible that they are
|
||||||
|
* a few pixels out in which case we need to track this and adjust the
|
||||||
|
* last image accordingly
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
trackWidth += fw;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* here we check if the combined images are exactly the width
|
||||||
|
* of the parent. If not then we add a few pixels on to make
|
||||||
|
* up the difference.
|
||||||
|
*
|
||||||
|
* This will alter the aspect ratio of the image slightly, but
|
||||||
|
* by a noticable amount.
|
||||||
|
*
|
||||||
|
* If the user doesn't want full width last row, we check for that here
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if(!isNotLast && trackWidth < settings.albumWidth){
|
||||||
|
if(settings.allowPartialLastRow === true && lastRow === true){
|
||||||
|
fw = fw;
|
||||||
|
}else{
|
||||||
|
fw = fw + (settings.albumWidth - trackWidth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fw--;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* We'll be doing a few things to the image so here we cache the image selector
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var $img = ( $obj.is("img") ) ? $obj : $obj.find("img");
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Set the width of the image and parent element
|
||||||
|
* if the resized element is not an image, we apply it to the child image also
|
||||||
|
*
|
||||||
|
* We need to check if it's an image as the css borders are only measured on
|
||||||
|
* images. If the parent is a div, we need make the contained image smaller
|
||||||
|
* to accommodate the css image borders.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$img.width(fw);
|
||||||
|
if( !$obj.is("img") ){
|
||||||
|
$obj.width(fw + obj[i][3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Set the height of the image
|
||||||
|
* if the resized element is not an image, we apply it to the child image also
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$img.height(fh);
|
||||||
|
if( !$obj.is("img") ){
|
||||||
|
$obj.height(fh + obj[i][4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Apply the css extras like padding
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
applyModifications($obj, isNotLast, settings);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Assign the effect to show the image
|
||||||
|
* Default effect is using jquery and not CSS3 to support more browsers
|
||||||
|
* Wait until the image is loaded to do this
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$img
|
||||||
|
.one('load', function (target) {
|
||||||
|
return function(){
|
||||||
|
if( settings.effect == 'default'){
|
||||||
|
target.animate({opacity: '1'},{duration: settings.fadeSpeed});
|
||||||
|
} else {
|
||||||
|
if(settings.direction == 'vertical'){
|
||||||
|
var sequence = (rownum <= 10 ? rownum : 10);
|
||||||
|
} else {
|
||||||
|
var sequence = (i <= 9 ? i+1 : 10);
|
||||||
|
}
|
||||||
|
/* Remove old classes with the "effect-" name */
|
||||||
|
target.removeClass(function (index, css) {
|
||||||
|
return (css.match(/\beffect-\S+/g) || []).join(' ');
|
||||||
|
});
|
||||||
|
target.addClass(settings.effect);
|
||||||
|
target.addClass("effect-duration-" + sequence);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}($obj))
|
||||||
|
/*
|
||||||
|
* fix for cached or loaded images
|
||||||
|
* For example if images are loaded in a "window.load" call we need to trigger
|
||||||
|
* the load call again
|
||||||
|
*/
|
||||||
|
.each(function() {
|
||||||
|
if(this.complete) $(this).trigger('load');
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* This private function applies the required css to space the image gallery
|
||||||
|
* It applies it to the parent element so if an image is wrapped in a <div> then
|
||||||
|
* the css is applied to the <div>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function applyModifications($obj, isNotLast, settings) {
|
||||||
|
var css = {
|
||||||
|
// Applying padding to element for the grid gap effect
|
||||||
|
'margin-bottom' : settings.padding + "px",
|
||||||
|
'margin-right' : (isNotLast) ? settings.padding + "px" : "0px",
|
||||||
|
// Set it to an inline-block by default so that it doesn't break the row
|
||||||
|
'display' : settings.display,
|
||||||
|
// Set vertical alignment otherwise you get 4px extra padding
|
||||||
|
'vertical-align' : "bottom",
|
||||||
|
// Hide the overflow to hide the caption
|
||||||
|
'overflow' : "hidden"
|
||||||
|
};
|
||||||
|
|
||||||
|
return $obj.css(css);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* This private function calculates any extras like padding, border associated
|
||||||
|
* with the image that will impact on the width calculations
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getImgProperty( img )
|
||||||
|
{
|
||||||
|
$img = $(img);
|
||||||
|
var params = new Array();
|
||||||
|
params["w"] = (parseFloat($img.css("border-left-width")) + parseFloat($img.css("border-right-width")));
|
||||||
|
params["h"] = (parseFloat($img.css("border-top-width")) + parseFloat($img.css("border-bottom-width")));
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.collagePlus.defaults = {
|
||||||
|
// the ideal height you want your images to be
|
||||||
|
'targetHeight' : 400,
|
||||||
|
// how quickly you want images to fade in once ready can be in ms, "slow" or "fast"
|
||||||
|
'fadeSpeed' : "fast",
|
||||||
|
// how the resized block should be displayed. inline-block by default so that it doesn't break the row
|
||||||
|
'display' : "inline-block",
|
||||||
|
// which effect you want to use for revealing the images (note CSS3 browsers only),
|
||||||
|
'effect' : 'default',
|
||||||
|
// effect delays can either be applied per row to give the impression of descending appearance
|
||||||
|
// or horizontally, so more like a flock of birds changing direction
|
||||||
|
'direction' : 'vertical',
|
||||||
|
// Sometimes there is just one image on the last row and it gets blown up to a huge size to fit the
|
||||||
|
// parent div width. To stop this behaviour, set this to true
|
||||||
|
'allowPartialLastRow' : false
|
||||||
|
};
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
|
/**
|
||||||
|
* zoom.js - It's the best way to zoom an image
|
||||||
|
* @version v0.0.2
|
||||||
|
* @link https://github.com/fat/zoom.js
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
+function ($) { "use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The zoom service
|
||||||
|
*/
|
||||||
|
function ZoomService () {
|
||||||
|
this._activeZoom =
|
||||||
|
this._initialScrollPosition =
|
||||||
|
this._initialTouchPosition =
|
||||||
|
this._touchMoveListener = null
|
||||||
|
|
||||||
|
this._$document = $(document)
|
||||||
|
this._$window = $(window)
|
||||||
|
this._$body = $(document.body)
|
||||||
|
|
||||||
|
this._boundClick = $.proxy(this._clickHandler, this)
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype.listen = function () {
|
||||||
|
this._$body.on('click', '[data-action="zoom"]', $.proxy(this._zoom, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._zoom = function (e) {
|
||||||
|
var target = e.target
|
||||||
|
|
||||||
|
if (!target || target.tagName != 'IMG') return
|
||||||
|
|
||||||
|
if (this._$body.hasClass('zoom-overlay-open')) return
|
||||||
|
|
||||||
|
if (e.metaKey || e.ctrlKey) {
|
||||||
|
return window.open((e.target.getAttribute('data-original') || e.target.src), '_blank')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target.width >= ($(window).width() - Zoom.OFFSET)) return
|
||||||
|
|
||||||
|
this._activeZoomClose(true)
|
||||||
|
|
||||||
|
this._activeZoom = new Zoom(target)
|
||||||
|
this._activeZoom.zoomImage()
|
||||||
|
|
||||||
|
// todo(fat): probably worth throttling this
|
||||||
|
this._$window.on('scroll.zoom', $.proxy(this._scrollHandler, this))
|
||||||
|
|
||||||
|
this._$document.on('keyup.zoom', $.proxy(this._keyHandler, this))
|
||||||
|
this._$document.on('touchstart.zoom', $.proxy(this._touchStart, this))
|
||||||
|
|
||||||
|
// we use a capturing phase here to prevent unintended js events
|
||||||
|
// sadly no useCapture in jquery api (http://bugs.jquery.com/ticket/14953)
|
||||||
|
if (document.addEventListener) {
|
||||||
|
document.addEventListener('click', this._boundClick, true)
|
||||||
|
} else {
|
||||||
|
document.attachEvent('onclick', this._boundClick, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('bubbles' in e) {
|
||||||
|
if (e.bubbles) e.stopPropagation()
|
||||||
|
} else {
|
||||||
|
// Internet Explorer before version 9
|
||||||
|
e.cancelBubble = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._activeZoomClose = function (forceDispose) {
|
||||||
|
if (!this._activeZoom) return
|
||||||
|
|
||||||
|
if (forceDispose) {
|
||||||
|
this._activeZoom.dispose()
|
||||||
|
} else {
|
||||||
|
this._activeZoom.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
this._$window.off('.zoom')
|
||||||
|
this._$document.off('.zoom')
|
||||||
|
|
||||||
|
document.removeEventListener('click', this._boundClick, true)
|
||||||
|
|
||||||
|
this._activeZoom = null
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._scrollHandler = function (e) {
|
||||||
|
if (this._initialScrollPosition === null) this._initialScrollPosition = $(window).scrollTop()
|
||||||
|
var deltaY = this._initialScrollPosition - $(window).scrollTop()
|
||||||
|
if (Math.abs(deltaY) >= 40) this._activeZoomClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._keyHandler = function (e) {
|
||||||
|
if (e.keyCode == 27) this._activeZoomClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._clickHandler = function (e) {
|
||||||
|
if (e.preventDefault) e.preventDefault()
|
||||||
|
else event.returnValue = false
|
||||||
|
|
||||||
|
if ('bubbles' in e) {
|
||||||
|
if (e.bubbles) e.stopPropagation()
|
||||||
|
} else {
|
||||||
|
// Internet Explorer before version 9
|
||||||
|
e.cancelBubble = true
|
||||||
|
}
|
||||||
|
|
||||||
|
this._activeZoomClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._touchStart = function (e) {
|
||||||
|
this._initialTouchPosition = e.touches[0].pageY
|
||||||
|
$(e.target).on('touchmove.zoom', $.proxy(this._touchMove, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomService.prototype._touchMove = function (e) {
|
||||||
|
if (Math.abs(e.touches[0].pageY - this._initialTouchPosition) > 10) {
|
||||||
|
this._activeZoomClose()
|
||||||
|
$(e.target).off('touchmove.zoom')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The zoom object
|
||||||
|
*/
|
||||||
|
function Zoom (img) {
|
||||||
|
this._fullHeight =
|
||||||
|
this._fullWidth =
|
||||||
|
this._overlay =
|
||||||
|
this._targetImageWrap = null
|
||||||
|
|
||||||
|
this._targetImage = img
|
||||||
|
|
||||||
|
this._$body = $(document.body)
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.OFFSET = 80
|
||||||
|
Zoom._MAX_WIDTH = 2560
|
||||||
|
Zoom._MAX_HEIGHT = 4096
|
||||||
|
|
||||||
|
Zoom.prototype.zoomImage = function () {
|
||||||
|
var img = document.createElement('img')
|
||||||
|
img.onload = $.proxy(function () {
|
||||||
|
this._fullHeight = Number(img.height)
|
||||||
|
this._fullWidth = Number(img.width)
|
||||||
|
this._zoomOriginal()
|
||||||
|
}, this)
|
||||||
|
img.src = this._targetImage.src
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.prototype._zoomOriginal = function () {
|
||||||
|
this._targetImageWrap = document.createElement('div')
|
||||||
|
this._targetImageWrap.className = 'zoom-img-wrap'
|
||||||
|
|
||||||
|
this._targetImage.parentNode.insertBefore(this._targetImageWrap, this._targetImage)
|
||||||
|
this._targetImageWrap.appendChild(this._targetImage)
|
||||||
|
|
||||||
|
$(this._targetImage)
|
||||||
|
.addClass('zoom-img')
|
||||||
|
.attr('data-action', 'zoom-out')
|
||||||
|
|
||||||
|
this._overlay = document.createElement('div')
|
||||||
|
this._overlay.className = 'zoom-overlay'
|
||||||
|
|
||||||
|
document.body.appendChild(this._overlay)
|
||||||
|
|
||||||
|
this._calculateZoom()
|
||||||
|
this._triggerAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.prototype._calculateZoom = function () {
|
||||||
|
this._targetImage.offsetWidth // repaint before animating
|
||||||
|
|
||||||
|
var originalFullImageWidth = this._fullWidth
|
||||||
|
var originalFullImageHeight = this._fullHeight
|
||||||
|
|
||||||
|
var scrollTop = $(window).scrollTop()
|
||||||
|
|
||||||
|
var maxScaleFactor = originalFullImageWidth / this._targetImage.width
|
||||||
|
|
||||||
|
var viewportHeight = ($(window).height() - Zoom.OFFSET)
|
||||||
|
var viewportWidth = ($(window).width() - Zoom.OFFSET)
|
||||||
|
|
||||||
|
var imageAspectRatio = originalFullImageWidth / originalFullImageHeight
|
||||||
|
var viewportAspectRatio = viewportWidth / viewportHeight
|
||||||
|
|
||||||
|
if (originalFullImageWidth < viewportWidth && originalFullImageHeight < viewportHeight) {
|
||||||
|
this._imgScaleFactor = maxScaleFactor
|
||||||
|
|
||||||
|
} else if (imageAspectRatio < viewportAspectRatio) {
|
||||||
|
this._imgScaleFactor = (viewportHeight / originalFullImageHeight) * maxScaleFactor
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this._imgScaleFactor = (viewportWidth / originalFullImageWidth) * maxScaleFactor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.prototype._triggerAnimation = function () {
|
||||||
|
this._targetImage.offsetWidth // repaint before animating
|
||||||
|
|
||||||
|
var imageOffset = $(this._targetImage).offset()
|
||||||
|
var scrollTop = $(window).scrollTop()
|
||||||
|
|
||||||
|
var viewportY = scrollTop + ($(window).height() / 2)
|
||||||
|
var viewportX = ($(window).width() / 2)
|
||||||
|
|
||||||
|
var imageCenterY = imageOffset.top + (this._targetImage.height / 2)
|
||||||
|
var imageCenterX = imageOffset.left + (this._targetImage.width / 2)
|
||||||
|
|
||||||
|
this._translateY = Math.round(viewportY - imageCenterY)
|
||||||
|
this._translateX = Math.round(viewportX - imageCenterX)
|
||||||
|
|
||||||
|
var targetTransform = 'scale(' + this._imgScaleFactor + ')'
|
||||||
|
var imageWrapTransform = 'translate(' + this._translateX + 'px, ' + this._translateY + 'px)'
|
||||||
|
|
||||||
|
if ($.support.transition) {
|
||||||
|
imageWrapTransform += ' translateZ(0)'
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this._targetImage)
|
||||||
|
.css({
|
||||||
|
'-webkit-transform': targetTransform,
|
||||||
|
'-ms-transform': targetTransform,
|
||||||
|
'transform': targetTransform
|
||||||
|
})
|
||||||
|
|
||||||
|
$(this._targetImageWrap)
|
||||||
|
.css({
|
||||||
|
'-webkit-transform': imageWrapTransform,
|
||||||
|
'-ms-transform': imageWrapTransform,
|
||||||
|
'transform': imageWrapTransform
|
||||||
|
})
|
||||||
|
|
||||||
|
this._$body.addClass('zoom-overlay-open')
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.prototype.close = function () {
|
||||||
|
this._$body
|
||||||
|
.removeClass('zoom-overlay-open')
|
||||||
|
.addClass('zoom-overlay-transitioning')
|
||||||
|
|
||||||
|
// we use setStyle here so that the correct vender prefix for transform is used
|
||||||
|
$(this._targetImage)
|
||||||
|
.css({
|
||||||
|
'-webkit-transform': '',
|
||||||
|
'-ms-transform': '',
|
||||||
|
'transform': ''
|
||||||
|
})
|
||||||
|
|
||||||
|
$(this._targetImageWrap)
|
||||||
|
.css({
|
||||||
|
'-webkit-transform': '',
|
||||||
|
'-ms-transform': '',
|
||||||
|
'transform': ''
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!$.support.transition) {
|
||||||
|
return this.dispose()
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this._targetImage)
|
||||||
|
.one($.support.transition.end, $.proxy(this.dispose, this))
|
||||||
|
.emulateTransitionEnd(300)
|
||||||
|
}
|
||||||
|
|
||||||
|
Zoom.prototype.dispose = function () {
|
||||||
|
if (this._targetImageWrap && this._targetImageWrap.parentNode) {
|
||||||
|
$(this._targetImage)
|
||||||
|
.removeClass('zoom-img')
|
||||||
|
.attr('data-action', 'zoom')
|
||||||
|
|
||||||
|
this._targetImageWrap.parentNode.replaceChild(this._targetImage, this._targetImageWrap)
|
||||||
|
this._overlay.parentNode.removeChild(this._overlay)
|
||||||
|
|
||||||
|
this._$body.removeClass('zoom-overlay-transitioning')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// wait for dom ready (incase script included before body)
|
||||||
|
$(function () {
|
||||||
|
new ZoomService().listen()
|
||||||
|
})
|
||||||
|
|
||||||
|
}(jQuery)
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
// Automatically add Zoom interaction
|
||||||
|
$('article img').attr('data-action', 'zoom');
|
||||||
|
|
||||||
|
// Make captions from Alt tags
|
||||||
|
$('img.captioned').each(function() {
|
||||||
|
var caption = $(this).attr('alt') || false;
|
||||||
|
if (caption) {
|
||||||
|
$(this).after('<p class="caption">' + caption + '</p>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Auto focus on the giant search box
|
||||||
|
var search = $('input.giant.search');
|
||||||
|
search.focus().val(search.val());
|
||||||
|
|
||||||
|
// Fire up that gallery
|
||||||
|
$(window).load(function () {
|
||||||
|
collage();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Anima
|
||||||
|
|
||||||
|
$('#nav-main .search').focus(function() {
|
||||||
|
$(this).addClass('grow');
|
||||||
|
}).blur(function() {
|
||||||
|
$(this).removeClass('grow');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function collage() {
|
||||||
|
$('.gallery-images').collagePlus({
|
||||||
|
'fadeSpeed' : 300
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitialize the gallery on browser resize.
|
||||||
|
var resizeTimer = null;
|
||||||
|
$(window).bind('resize', function() {
|
||||||
|
$('.gallery-images img').css("opacity", 0);
|
||||||
|
|
||||||
|
if (resizeTimer) clearTimeout(resizeTimer);
|
||||||
|
|
||||||
|
resizeTimer = setTimeout(collage, 200);
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=redwood.js.map
|
|
@ -0,0 +1,397 @@
|
||||||
|
loadIndex()
|
||||||
|
|
||||||
|
// Highlight with jQuery
|
||||||
|
// from: https://stackoverflow.com/questions/41533785/how-to-highlight-search-text-in-html-with-the-help-of-js
|
||||||
|
// @todo: This is the only use of jQuery. Find a vanila JS way
|
||||||
|
jQuery.fn.highlight = function(pat) {
|
||||||
|
|
||||||
|
function innerHighlight(node, pat) {
|
||||||
|
|
||||||
|
var skip = 0;
|
||||||
|
|
||||||
|
if (node.nodeType == 3) {
|
||||||
|
|
||||||
|
var pos = node.data.toUpperCase().indexOf(pat);
|
||||||
|
|
||||||
|
if (pos >= 0) {
|
||||||
|
|
||||||
|
var spannode = document.createElement('span');
|
||||||
|
spannode.className = 'highlighted';
|
||||||
|
var middlebit = node.splitText(pos);
|
||||||
|
var endbit = middlebit.splitText(pat.length);
|
||||||
|
var middleclone = middlebit.cloneNode(true);
|
||||||
|
|
||||||
|
spannode.appendChild(middleclone);
|
||||||
|
middlebit.parentNode.replaceChild(spannode, middlebit);
|
||||||
|
|
||||||
|
skip = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (node.nodeType == 1 && node.childNodes && !/(script|style) /i.test(node.tagName)) {
|
||||||
|
for (var i = 0; i < node.childNodes.length; ++i) {
|
||||||
|
|
||||||
|
i += innerHighlight(node.childNodes[i], pat);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return skip;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.each(function() {
|
||||||
|
|
||||||
|
innerHighlight(this, pat.toUpperCase());
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
jQuery.fn.removeHighlight = function() {
|
||||||
|
|
||||||
|
function newNormalize(node) {
|
||||||
|
|
||||||
|
for (var i = 0, children = node.childNodes, nodeCount = children.length; i < nodeCount; i++) {
|
||||||
|
|
||||||
|
var child = children[i];
|
||||||
|
|
||||||
|
if (child.nodeType == 1) {
|
||||||
|
|
||||||
|
newNormalize(child);
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child.nodeType != 3) { continue; }
|
||||||
|
|
||||||
|
var next = child.nextSibling;
|
||||||
|
|
||||||
|
if (next == null || next.nodeType != 3) { continue; }
|
||||||
|
|
||||||
|
var combined_text = child.nodeValue + next.nodeValue;
|
||||||
|
new_node = node.ownerDocument.createTextNode(combined_text);
|
||||||
|
|
||||||
|
node.insertBefore(new_node, child);
|
||||||
|
node.removeChild(child);
|
||||||
|
node.removeChild(next);
|
||||||
|
i--;
|
||||||
|
nodeCount--;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.find("span.highlighted").each(function() {
|
||||||
|
|
||||||
|
var thisParent = this.parentNode;
|
||||||
|
thisParent.replaceChild(this.firstChild, this);
|
||||||
|
newNormalize(thisParent);
|
||||||
|
|
||||||
|
}).end();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
$('#search-input').bind('keyup change', function(ev) {
|
||||||
|
|
||||||
|
// pull in the new value
|
||||||
|
var searchTerm = $(this).val();
|
||||||
|
|
||||||
|
// remove any old highlighted terms
|
||||||
|
$('body').removeHighlight();
|
||||||
|
|
||||||
|
// disable highlighting if empty
|
||||||
|
if ( searchTerm ) {
|
||||||
|
|
||||||
|
// highlight the new term
|
||||||
|
$('body').highlight( searchTerm );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
|
var scrollTop = 0
|
||||||
|
document.addEventListener("turbolinks:before-render", function() {
|
||||||
|
var search_index = document.getElementById("search-results");
|
||||||
|
var y = search_index.scrollTop;
|
||||||
|
scrollTop = y
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
document.addEventListener("turbolinks:render", function() {
|
||||||
|
var search_index = document.getElementById("search-results");
|
||||||
|
search_index.scrollTop = scrollTop
|
||||||
|
})
|
||||||
|
|
||||||
|
document.addEventListener("turbolinks:load", function() {
|
||||||
|
setNoteWrapperState()
|
||||||
|
|
||||||
|
|
||||||
|
const current = window.location.href
|
||||||
|
|
||||||
|
var els = document.getElementsByTagName("a");
|
||||||
|
for (var i = 0, l = els.length; i < l; i++) {
|
||||||
|
var el = els[i];
|
||||||
|
|
||||||
|
if (el.href === current) {
|
||||||
|
el.classList.add("selected")
|
||||||
|
} else {
|
||||||
|
el.classList.remove("selected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function loadIndex() {
|
||||||
|
fetchJSON(function(response) {
|
||||||
|
|
||||||
|
const notes = response;
|
||||||
|
const search_results = document.getElementById('search-results');
|
||||||
|
const tags = document.getElementById('tags');
|
||||||
|
const current_note = window.location.href;
|
||||||
|
notes.index.forEach(note => {
|
||||||
|
const title = '<h4>'+ note.title + '</h4>';
|
||||||
|
const summary = '<div>' + note.summary + '</div>';
|
||||||
|
|
||||||
|
const permalink = note.permalink
|
||||||
|
|
||||||
|
var thumbnail = ""
|
||||||
|
if (note.thumbnail === "") {
|
||||||
|
thumbnail = ""
|
||||||
|
} else {
|
||||||
|
// @todo:
|
||||||
|
// this loads the first image of the note
|
||||||
|
// for every note in the vault
|
||||||
|
// this isn't efficient at all
|
||||||
|
// 2 ideas:
|
||||||
|
// find a way of resizing with hugo
|
||||||
|
// use lazy loading.
|
||||||
|
thumbnail = '<img loading="lazy" src="' + note.thumbnail + '?nf_resize=fit&w=122&h=76"/><span style="display:none";>@attachments</span>'
|
||||||
|
}
|
||||||
|
|
||||||
|
const tags = '<span style="display:none">' + note.tags + '</span>'
|
||||||
|
var list_content;
|
||||||
|
if (current_note === permalink) {
|
||||||
|
list_content = '<a href="/MATH201' + permalink + '" class="selected search-item" tabindex="0">' + title + summary + '</a>'
|
||||||
|
} else {
|
||||||
|
list_content = '<a href="/MATH201' + permalink + '" class="search-item" tabindex="0">' + title + summary + thumbnail + tags + '</a>'
|
||||||
|
}
|
||||||
|
|
||||||
|
const child = document.createElement("li");
|
||||||
|
child.innerHTML = list_content;
|
||||||
|
search_results.append(child)
|
||||||
|
});
|
||||||
|
|
||||||
|
// @todo: wip
|
||||||
|
// notes.tags.forEach(tag => {
|
||||||
|
// const child = document.createElement("li");
|
||||||
|
// child.innerHTML = '<a onclick="focusTag(this)">' + tag + '</a>'
|
||||||
|
// tags.append(child)
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function fetchJSON(callback) {
|
||||||
|
|
||||||
|
const requestURL = '/MATH201/index.json';
|
||||||
|
const request = new XMLHttpRequest();
|
||||||
|
request.open('GET', requestURL, true);
|
||||||
|
request.responseType = 'json';
|
||||||
|
request.onreadystatechange = function() {
|
||||||
|
if (request.readyState === 4 && request.status === 200) {
|
||||||
|
callback(request.response);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
request.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
function focusTag(a) {
|
||||||
|
showNav()
|
||||||
|
performSearchWith(a.innerText)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function performSearchWith(query) {
|
||||||
|
|
||||||
|
// document.getElementById('search-input').value = query
|
||||||
|
|
||||||
|
var filter, ul, li, a, i, txtValue;
|
||||||
|
|
||||||
|
filter = query.toLowerCase();
|
||||||
|
filter = filter.replace('/[.*+?^${}()|[\]\\]/g', '\\$&');
|
||||||
|
|
||||||
|
var re = new RegExp(filter, 'g');
|
||||||
|
|
||||||
|
ul = document.getElementById("search-results");
|
||||||
|
li = ul.getElementsByTagName('li');
|
||||||
|
|
||||||
|
for (i = 0; i < li.length; i++) {
|
||||||
|
a = li[i].getElementsByTagName("a")[0];
|
||||||
|
|
||||||
|
txtValue = a.textContent || a.innerText;
|
||||||
|
if (txtValue.toLowerCase().indexOf(filter) > -1) {
|
||||||
|
|
||||||
|
li[i].style.display = "block";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
li[i].style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function performSearch() {
|
||||||
|
|
||||||
|
var input, filter, ul, li, a, i, txtValue;
|
||||||
|
input = document.getElementById('search-input');
|
||||||
|
|
||||||
|
filter = input.value.toLowerCase();
|
||||||
|
filter = filter.replace('/[.*+?^${}()|[\]\\]/g', '\\$&');
|
||||||
|
|
||||||
|
var re = new RegExp(filter, 'g');
|
||||||
|
|
||||||
|
ul = document.getElementById("search-results");
|
||||||
|
li = ul.getElementsByTagName('li');
|
||||||
|
|
||||||
|
for (i = 0; i < li.length; i++) {
|
||||||
|
a = li[i].getElementsByTagName("a")[0];
|
||||||
|
|
||||||
|
txtValue = a.textContent || a.innerText;
|
||||||
|
if (txtValue.toLowerCase().indexOf(filter) > -1) {
|
||||||
|
|
||||||
|
li[i].style.display = "block";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
li[i].style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Keyboard shortcuts
|
||||||
|
document.addEventListener('keydown', function(evt) {
|
||||||
|
|
||||||
|
if (evt.metaKey && evt.which === 75 || evt.ctrlKey && evt.which === 75) {
|
||||||
|
document.getElementById("search-input").focus();
|
||||||
|
handleNavVisibility()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evt.key === "Escape" || evt.key === "Esc" | evt.keyCode === 27) {
|
||||||
|
hideNav()
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
var nav_is_visible = false;
|
||||||
|
function handleNavVisibility() {
|
||||||
|
if (!nav_is_visible) {
|
||||||
|
showNav();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
hideNav()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showNav() {
|
||||||
|
|
||||||
|
document.getElementById("search").style.width = "300px";
|
||||||
|
document.getElementById("search").style.opacity = 1;
|
||||||
|
document.getElementById("search-header").style.opacity = 1;
|
||||||
|
document.getElementById("search-header").style.width = "299px";
|
||||||
|
pushNoteWrapper()
|
||||||
|
|
||||||
|
nav_is_visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideNav() {
|
||||||
|
document.getElementById("search").style.width = "0";
|
||||||
|
document.getElementById("search-header").style.width = "0";
|
||||||
|
document.getElementById("search").style.opacity = 0;
|
||||||
|
document.getElementById("search-header").style.opacity = 0;
|
||||||
|
document.getElementById("main").style.marginLeft= "0";
|
||||||
|
pullNoteWrapper()
|
||||||
|
|
||||||
|
nav_is_visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setNoteWrapperState() {
|
||||||
|
if (nav_is_visible) {
|
||||||
|
pushNoteWrapper()
|
||||||
|
} else {
|
||||||
|
pullNoteWrapper()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pushNoteWrapper() {
|
||||||
|
document.getElementById("main").style.marginLeft = "300px";
|
||||||
|
}
|
||||||
|
|
||||||
|
function pullNoteWrapper() {
|
||||||
|
document.getElementById("main").style.marginLeft = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Prefetching
|
||||||
|
// https://github.com/turbolinks/turbolinks/issues/313
|
||||||
|
const hoverTime = 300
|
||||||
|
const fetchers = {}
|
||||||
|
const doc = document.implementation.createHTMLDocument('prefetch')
|
||||||
|
|
||||||
|
function fetchPage (url, success) {
|
||||||
|
const xhr = new XMLHttpRequest()
|
||||||
|
xhr.open('GET', url)
|
||||||
|
xhr.setRequestHeader('VND.PREFETCH', 'true')
|
||||||
|
xhr.setRequestHeader('Accept', 'text/html')
|
||||||
|
xhr.onreadystatechange = () => {
|
||||||
|
if (xhr.readyState !== XMLHttpRequest.DONE) return
|
||||||
|
if (xhr.status !== 200) return
|
||||||
|
success(xhr.responseText)
|
||||||
|
}
|
||||||
|
xhr.send()
|
||||||
|
}
|
||||||
|
|
||||||
|
function prefetchTurbolink (url) {
|
||||||
|
fetchPage(url, responseText => {
|
||||||
|
doc.open()
|
||||||
|
doc.write(responseText)
|
||||||
|
doc.close()
|
||||||
|
const snapshot = Turbolinks.Snapshot.fromHTMLElement(doc.documentElement)
|
||||||
|
Turbolinks.controller.cache.put(url, snapshot)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function prefetch (url) {
|
||||||
|
if (prefetched(url)) return
|
||||||
|
prefetchTurbolink(url)
|
||||||
|
}
|
||||||
|
|
||||||
|
function prefetched (url) {
|
||||||
|
return location.href === url || Turbolinks.controller.cache.has(url)
|
||||||
|
}
|
||||||
|
|
||||||
|
function prefetching (url) {
|
||||||
|
return !!fetchers[url]
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanup (event) {
|
||||||
|
const element = event.target
|
||||||
|
clearTimeout(fetchers[element.href])
|
||||||
|
element.removeEventListener('mouseleave', cleanup)
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('mouseover', event => {
|
||||||
|
if (!event.target.dataset.prefetch) return
|
||||||
|
const url = event.target.href
|
||||||
|
if (prefetched(url)) return
|
||||||
|
if (prefetching(url)) return
|
||||||
|
cleanup(event)
|
||||||
|
event.target.addEventListener('mouseleave', cleanup)
|
||||||
|
fetchers[url] = setTimeout(() => prefetch(url), hoverTime)
|
||||||
|
})
|
|
@ -0,0 +1,19 @@
|
||||||
|
var thumbnail_mode = false
|
||||||
|
function imageMode() {
|
||||||
|
const note_wrapper = document.getElementById('note-wrapper')
|
||||||
|
const images = note_wrapper.getElementsByTagName('img')
|
||||||
|
|
||||||
|
if (thumbnail_mode) {
|
||||||
|
var els = note_wrapper.getElementsByTagName('img')
|
||||||
|
for(var i = 0, all = els.length; i < all; i++){
|
||||||
|
els[i].classList.remove('thumbnail');
|
||||||
|
}
|
||||||
|
thumbnail_mode = false
|
||||||
|
} else {
|
||||||
|
var els = note_wrapper.getElementsByTagName('img')
|
||||||
|
for(var i = 0, all = els.length; i < all; i++){
|
||||||
|
els[i].classList.add('thumbnail');
|
||||||
|
}
|
||||||
|
thumbnail_mode = true
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Zettelkästen is learning
|
||||||
|
---
|
||||||
|
|
||||||
|
Learning is about creating knowledge by connecting new information to existing information.
|
||||||
|
|
||||||
|
Zettelkästen allows you to connect information. Zettelkästen is learning.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Cooking recipes
|
||||||
|
---
|
||||||
|
|
||||||
|
- [[20200630171342]] Arequipe
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
title: Categories make learning difficult
|
||||||
|
---
|
||||||
|
|
||||||
|
Categories are artificial[^1] and make connecting information difficult (and therefore learning)[^2]
|
||||||
|
|
||||||
|
|
||||||
|
[^1]: [[20200630172528]]
|
||||||
|
[^2]: [[20200607203451]]
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: Arequipe
|
||||||
|
---
|
||||||
|
|
||||||
|
Arequipe is a Colombian dessert.
|
||||||
|
|
||||||
|
### Ingredients
|
||||||
|
|
||||||
|
- 500ml of milk
|
||||||
|
- 300g of white sugar
|
||||||
|
- 1/2 teaspoon of backing soda
|
||||||
|
-
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Categories don't exists
|
||||||
|
---
|
||||||
|
|
||||||
|
> If our small minds, for some convenience, divide this glass of wine, this universe, into parts — physics, biology, geology, astronomy, psychology, and so on — remember that Nature does not know it! Richard Feynman in The Feynman Lectures on Physics
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
title: Master note
|
||||||
|
keywords: masternote
|
||||||
|
metatags: #bookmarks
|
||||||
|
---
|
||||||
|
|
||||||
|
Hi! This is a version online version of my Zettelkästen.
|
||||||
|
|
||||||
|
You can navigate through my notes with the arrow keys `←`and `→`.
|
||||||
|
|
||||||
|
You can activate the search box by using the `⌘` + `k` shortcut
|
||||||
|
|
||||||
|
|
||||||
|
- [[features]] Features
|
||||||
|
- [[20200607203451]] Zettelkästen is learning
|
||||||
|
- [[20200607203534]] Cooking recipes
|
||||||
|
- [[20200607203609]] Categories don't work
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
title: All features
|
||||||
|
---
|
||||||
|
|
||||||
|
### Wikilinks
|
||||||
|
|
||||||
|
{{% include "wikilinks.md" %}}
|
||||||
|
|
||||||
|
### Split View
|
||||||
|
|
||||||
|
{{% include "split-view.md" %}}
|
||||||
|
|
||||||
|
### Themeable
|
||||||
|
|
||||||
|
{{% include "themeable.md" %}}
|
||||||
|
|
||||||
|
### Transclude
|
||||||
|
|
||||||
|
{{% include "transclude.md" %}}
|
||||||
|
|
||||||
|
### Backlinks
|
||||||
|
|
||||||
|
{{% include "backlinks.md" %}}
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: Backlinks
|
||||||
|
---
|
||||||
|
|
||||||
|
Backlinks are shown at the bottom of the zettel
|
||||||
|
|
||||||
|
⬇️ ⬇️ ⬇️ ⬇️
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: Features
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
- [[wikilinks]] Wikilinks
|
||||||
|
- [[split-view]] Split View
|
||||||
|
- [[backlinks]] Backlinks
|
||||||
|
- [[transclude]] Transclude content
|
||||||
|
- [[themeable]] Themeable
|
||||||
|
- [[search]] Search
|
||||||
|
- [[all-features]] All features
|
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 501 KiB |
After Width: | Height: | Size: 3.2 MiB |
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: Search
|
||||||
|
---
|
||||||
|
|
||||||
|
Activate the search box by using the keyboard shortcut `⌘`+`k`
|
||||||
|
|
||||||
|
<video controls style="max-width: 100%;box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); display: block;margin-left: auto;margin-right: auto;margin-bottom: 1rem;">
|
||||||
|
<source src="media/search.mp4" type="video/mp4">
|
||||||
|
Your browser does not support the video tag.
|
||||||
|
</video>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Split View
|
||||||
|
---
|
||||||
|
|
||||||
|
<video controls style="max-width: 100%;box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); display: block;margin-left: auto;margin-right: auto;margin-bottom: 1rem;">
|
||||||
|
<source src="media/splitview.mp4" type="video/mp4">
|
||||||
|
Your browser does not support the video tag.
|
||||||
|
</video>
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Themeable
|
||||||
|
---
|
||||||
|
|
||||||
|
<video controls style="max-width: 100%;box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); display: block;margin-left: auto;margin-right: auto;margin-bottom: 1rem;">
|
||||||
|
<source src="media/themeable.mp4" type="video/mp4">
|
||||||
|
Your browser does not support the video tag.
|
||||||
|
</video>
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: Transclude
|
||||||
|
---
|
||||||
|
|
||||||
|
Transclusion of content is enabled by using the special shortcode inside your note.
|
||||||
|
|
||||||
|
```go
|
||||||
|
{{</*% include "this-note-content-will-be-rendered-here.md" %*/>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
For see it in action take a look at the "all features" page -> [[all-features]]
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: Wikilinks
|
||||||
|
---
|
||||||
|
|
||||||
|
Wikilinks are implemented, so this:
|
||||||
|
|
||||||
|
![](media/editorscreenshot.png)
|
||||||
|
|
||||||
|
Becomes this
|
||||||
|
|
||||||
|
![](media/sitescreenshot.png)
|
||||||
|
|
||||||
|
|
||||||
|
Please note that spaces between filenames **are not allowed**
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
- ✅ [[my-linking-note]]
|
||||||
|
- ❌ [[my linking note]]
|
||||||
|
```
|
|
@ -0,0 +1,8 @@
|
||||||
|
[backlinks]
|
||||||
|
other = "Referenced in"
|
||||||
|
[private-note]
|
||||||
|
other = "Private note"
|
||||||
|
[no-backlinks]
|
||||||
|
other = "No backlinks found"
|
||||||
|
[not-found]
|
||||||
|
other = "Note not found"
|
|
@ -0,0 +1,8 @@
|
||||||
|
[backlinks]
|
||||||
|
other = "Referenciada en"
|
||||||
|
[private-note]
|
||||||
|
other = "Nota privada"
|
||||||
|
[no-backlinks]
|
||||||
|
other = "No hay referencias"
|
||||||
|
[not-found]
|
||||||
|
other = "Nota no encontrada"
|
|
@ -0,0 +1,8 @@
|
||||||
|
[backlinks]
|
||||||
|
other = "Référencée en"
|
||||||
|
[private-note]
|
||||||
|
other = "Note privée"
|
||||||
|
[no-backlinks]
|
||||||
|
other = "Pas de références"
|
||||||
|
[not-found]
|
||||||
|
other = "Note non trouvée"
|
|
@ -0,0 +1,4 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>404</h1>
|
||||||
|
<p>{{ i18n "not-found" }}</p>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,126 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Language.Lang }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" integrity="sha384-GvrOXuhMATgEsSwCs4smul74iXGOixntILdUW9XmUC6+HX0sLNAK3q71HotJqlAn" crossorigin="anonymous">
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js" integrity="sha384-cpW21h6RZv/phavutF+AuVYrr+dA8xD9zs6FwLpaCct6O9ctzYFfFr4dgmgccOTx" crossorigin="anonymous"></script>
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="{{ .Content | truncate 300 }}">
|
||||||
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
|
|
||||||
|
{{ printf `
|
||||||
|
<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
|
||||||
|
{{ $manifest := resources.Get "manifest.json" }}
|
||||||
|
<link rel="manifest" href="{{ $manifest.Permalink }}">
|
||||||
|
|
||||||
|
{{- template "_internal/opengraph.html" . -}}
|
||||||
|
{{- template "_internal/twitter_cards.html" . -}}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "title" "" }}
|
||||||
|
{{ if eq (.Param "bear") true }}
|
||||||
|
{{ $.Scratch.Set "title" .File.BaseFileName }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
{{- $siteTitle := ( .Site.Title ) -}}
|
||||||
|
|
||||||
|
{{- if .IsHome -}}
|
||||||
|
<title>{{ $siteTitle }}</title>
|
||||||
|
{{- else -}}
|
||||||
|
<title>{{ $title }} - {{ $siteTitle }}</title>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $theme := .Param "theme" }}
|
||||||
|
{{ $themeRoute := printf "%s%s%s" "css/themes/" $theme ".css" }}
|
||||||
|
|
||||||
|
{{ $themeVariables := resources.Get $themeRoute }}
|
||||||
|
{{ $styles := resources.Get "css/style.scss" | toCSS }}
|
||||||
|
{{ $syntax := resources.Get "css/utilities/syntax-light.css"}}
|
||||||
|
|
||||||
|
{{ $main := slice $themeVariables $styles $syntax | resources.Concat "css/main.css" | minify | fingerprint }}
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ $main.Permalink }}" />
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
|
||||||
|
{{ $turbolinks := resources.Get "js/turbolinks.js" }}
|
||||||
|
{{ $thumbnails := resources.Get "js/thumbnails.js" }}
|
||||||
|
{{ $search := resources.Get "js/search.js" }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "jslibs" slice }}
|
||||||
|
{{ $libs := slice "js/turbolinks.js" "js/thumbnails.js" "js/search.js" }}
|
||||||
|
|
||||||
|
{{ range $libs }}
|
||||||
|
{{ $.Scratch.Add "jslibs" (resources.Get . ) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $js := .Scratch.Get "jslibs" | resources.Concat "js/main.js" }}
|
||||||
|
|
||||||
|
{{ if .Site.IsServer }}
|
||||||
|
<script src="{{ $js.Permalink }}"></script>
|
||||||
|
{{ else }}
|
||||||
|
{{ $js := $js | minify | fingerprint }}
|
||||||
|
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{{ partialCached "search.html" . }}
|
||||||
|
{{ partialCached "toolbar.html" . }}
|
||||||
|
{{ partial "tests/main.html" . }}
|
||||||
|
|
||||||
|
<main id="main">
|
||||||
|
|
||||||
|
<div id="note-wrapper" class="note-wrapper">
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
function renderMath(){ renderMathInElement(document.body, {
|
||||||
|
delimiters: [
|
||||||
|
{left: '$$', right: '$$', display: true},
|
||||||
|
{left: '$', right: '$', display: false},
|
||||||
|
{left: '\\(', right: '\\)', display: false},
|
||||||
|
{left: '\\[', right: '\\]', display: true}
|
||||||
|
],
|
||||||
|
throwOnError : false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//document.addEventListener("DOMContentLoaded", renderMath);
|
||||||
|
//renderMath();
|
||||||
|
if (document.readyState !== 'loading'){
|
||||||
|
renderMath();} else {
|
||||||
|
document.addEventListener("DOMContentLoaded", renderMath);}
|
||||||
|
|
||||||
|
// (function() {
|
||||||
|
//
|
||||||
|
// var doc_ols = document.getElementsByTagName("ol");
|
||||||
|
//
|
||||||
|
// for ( i=0; i<doc_ols.length; i++) {
|
||||||
|
//
|
||||||
|
// var ol_start = doc_ols[i].getAttribute("start") - 1;
|
||||||
|
// doc_ols[i].setAttribute("style", "counter-reset:ol_counter " + ol_start + ";");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// })();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,8 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<p><a href="https://sasserisop.com">Back to Sasserisop homepage</a></p>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ partial "content.html" . }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,50 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<p style="text-align: center;"><a href=./>Back to index</a></p>
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "title" "" }}
|
||||||
|
{{ if ne (.Param "bear") true }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{$.Scratch.Set "title" .Title }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .File.BaseFileName }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
<!--
|
||||||
|
Protects content if the note has the "private" tag on the YAML
|
||||||
|
-->
|
||||||
|
{{- if and (isset .Params "private") (eq .Params.private true) -}}
|
||||||
|
{{ if .Site.IsServer }}
|
||||||
|
<p>🔒</p>
|
||||||
|
{{ partial "content.html" . }}
|
||||||
|
{{ else }}
|
||||||
|
<p>🔒 {{ i18n "private-note" }}</p>
|
||||||
|
{{ end }}
|
||||||
|
{{- else -}}
|
||||||
|
<!--
|
||||||
|
If the note hasn't the "private" tag, but has the "private" word on its content, we want to protect the content.
|
||||||
|
|
||||||
|
This is because when using bear mode, we don't use yaml.
|
||||||
|
|
||||||
|
@todo:
|
||||||
|
- find a better way of doing this (this is false-positive prone)
|
||||||
|
- code refactor
|
||||||
|
-->
|
||||||
|
{{ $private := .Content | findRE "private-note" }}
|
||||||
|
{{ if le (len $private) 0 }}
|
||||||
|
{{ partial "content.html" . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ if.Site.IsServer }}
|
||||||
|
<p>🔒</p>
|
||||||
|
{{ partial "content.html" .}}
|
||||||
|
{{ else }}
|
||||||
|
<h1>{{ $title }}</h1>
|
||||||
|
<p>🔒 {{ i18n "private-note" }}</p>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/* partial "backlinks.html" . */}}
|
||||||
|
<p style="text-align: center;"><a href="./">Back to index</a></p>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,4 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<p style="text-align: center;"><a href="http://sasserisop.com">Back to Sasserisop homepage</a></p>
|
||||||
|
{{ partial "content.html" . }}
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,66 @@
|
||||||
|
{{- $tagregex3 := "#([^\\s^#][^#]*[^\\s^#])#\\n" -}}
|
||||||
|
{{- $tagregex2 := "#([^\\s^#][^#]*[^\\s^#])#\\s" -}}
|
||||||
|
{{- $tagregex := "[^/A-z]#([^#\\s\\,:}\\.]+)" -}}
|
||||||
|
|
||||||
|
{{- $imageRegex := "!\\[(.*?)\\]\\((.*?)\\)" -}}
|
||||||
|
|
||||||
|
{{- $.Scratch.Add "index" slice -}}
|
||||||
|
{{- $.Scratch.Add "tags" slice -}}
|
||||||
|
{{- range where .Site.RegularPages "Type" "not in" (slice "json") -}}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "title" "" }}
|
||||||
|
{{ if eq (.Param "bear") true }}
|
||||||
|
{{ $.Scratch.Set "title" .File.BaseFileName }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "summary" "" }}
|
||||||
|
{{- if and (isset .Params "private") (eq .Params.private true) -}}
|
||||||
|
{{ $.Scratch.Set "summary" "🔐 Private note" }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ $.Scratch.Set "summary" (.Summary | truncate 70) }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ $summary := $.Scratch.Get "summary" }}
|
||||||
|
|
||||||
|
{{ $tags3 := .RawContent | findRE $tagregex3 }}
|
||||||
|
{{ $tags2 := .RawContent | findRE $tagregex2 }}
|
||||||
|
{{ $tags := .RawContent | findRE $tagregex }}
|
||||||
|
|
||||||
|
{{ $unifiedTagSlice := union $tags3 $tags2 }}
|
||||||
|
{{ $unionTags := union $tags $unifiedTagSlice }}
|
||||||
|
|
||||||
|
{{- range $unionTags -}}
|
||||||
|
{{ $tag := . | replaceRE "\\n" "" }}
|
||||||
|
{{ $tag := $tag | replaceRE "\\s" "" }}
|
||||||
|
{{ $tag := $tag | replaceRE "#" "" }}
|
||||||
|
{{- $.Scratch.Add "tags" $tag }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $allTags := (slice $tags3 $tags2 $tags) }}
|
||||||
|
|
||||||
|
{{ $imagesRaw := .RawContent | findRE $imageRegex }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "thumbnail" "" }}
|
||||||
|
{{ range first 1 $imagesRaw }}
|
||||||
|
{{ $rawItem := . }}
|
||||||
|
{{ $capturedGroup := $rawItem | replaceRE $imageRegex "$2" }}
|
||||||
|
{{ $.Scratch.Set "thumbnail" $capturedGroup }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $thumbnail := $.Scratch.Get "thumbnail" }}
|
||||||
|
|
||||||
|
{{- $.Scratch.Add "index" (dict "title" $title "permalink" .Permalink "summary" $summary "tags" $unionTags "thumbnail" $thumbnail ) -}}
|
||||||
|
|
||||||
|
{{- end -}}
|
||||||
|
{{- $index := .Scratch.Get "index" -}}
|
||||||
|
|
||||||
|
{{ $tags := $.Scratch.Get "tags" }}
|
||||||
|
{{- $unicTags := uniq $tags -}}
|
||||||
|
{{- $unicTags := sort $unicTags -}}
|
||||||
|
{{- $json := dict "index" $index "tags" $unicTags -}}
|
||||||
|
{{- $json | jsonify }}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Search for [[wikilink]] instead of "wikilink" when finding backlinks to prevent false positives: Otherwise, for a note whose filename/title is "now", every note containing the word "now" would be appended as a backlink)
|
||||||
|
|
||||||
|
Regex not working for notes with colons on filename because hugo .File.BaseFileName returns a string with colons removed.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $firstBracket := "\\[\\[" }}
|
||||||
|
{{ $lastBracket := "\\]\\]" }}
|
||||||
|
{{ $filename := .File.BaseFileName }}
|
||||||
|
{{ $wikilink := printf "%s%s%s" $firstBracket $filename $lastBracket }}
|
||||||
|
|
||||||
|
{{- $.Scratch.Add "backlinks" slice -}}
|
||||||
|
<h3>{{ i18n "backlinks" }}</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{{- range .Site.RegularPages -}}
|
||||||
|
{{ if (findRE $wikilink .Content) }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Set "title" "" }}
|
||||||
|
<!-- If bear mode is on we'll show the filename instead of the yaml title -->
|
||||||
|
{{ if eq (.Param "bear") true }}
|
||||||
|
{{ $.Scratch.Set "title" .File.BaseFileName }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Add "backlinks" (dict .Permalink $title) }}
|
||||||
|
<li><a href="{{ .Permalink }}">{{ $title }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $backlinks := $.Scratch.Get "backlinks" -}}
|
||||||
|
|
||||||
|
{{ if le (len $backlinks) 0 }}
|
||||||
|
<li>{{ i18n "no-backlinks" }}</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
|
@ -0,0 +1,113 @@
|
||||||
|
<!--
|
||||||
|
|
||||||
|
=======
|
||||||
|
Wiklinks
|
||||||
|
=======
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $firstBracket := "\\[\\[" }}
|
||||||
|
{{ $lastBracket := "\\]\\]" }}
|
||||||
|
{{ $matrixBreak := "\\\\\\\\"}}
|
||||||
|
{{ $wikiregex := "\\[\\[([^/]+?)\\]\\]" }}
|
||||||
|
|
||||||
|
{{ $wikilinks := .Content | findRE $wikiregex }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Add "content" .RawContent }}
|
||||||
|
|
||||||
|
{{ range $wikilinks }}
|
||||||
|
|
||||||
|
{{ $content := . | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $content := $content | replaceRE "\\?" "\\?" }}
|
||||||
|
|
||||||
|
{{ $wikilink := printf "%s%s%s" $firstBracket $content $lastBracket }}
|
||||||
|
|
||||||
|
{{ $anchorized := $content | anchorize }}
|
||||||
|
|
||||||
|
{{ $link := printf "%s%s%s%s%s%s" "<a href=\"" $anchorized ".html" "\">" $content "</a>" }}
|
||||||
|
|
||||||
|
{{ $noteContent := $.Scratch.Get "content" | replaceRE $wikilink $link }}
|
||||||
|
{{ $.Scratch.Set "content" $noteContent }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $content := .Scratch.Get "content" }}
|
||||||
|
{{ $content := $content | replaceRE "\n" "\n\n" }}
|
||||||
|
{{ $content := $content | replaceRE $matrixBreak "\\\\\\\\\\\\\\\\" }}
|
||||||
|
<!--The above command replaces a \\ in content/*.md files with a \\\\ yes it looks silly-->
|
||||||
|
<!--
|
||||||
|
====
|
||||||
|
TAGS
|
||||||
|
====
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
===================================
|
||||||
|
Regular tags followed by a new line
|
||||||
|
===================================
|
||||||
|
|
||||||
|
#mytag/with-no-espaces
|
||||||
|
|
||||||
|
New line
|
||||||
|
-->
|
||||||
|
{{ $tagregexN := "#([^#\\s\\,:}]+)\\n" }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
===================================
|
||||||
|
Regular tags followed by a hashtag
|
||||||
|
===================================
|
||||||
|
|
||||||
|
#mytag/with-no-espaces
|
||||||
|
|
||||||
|
New line
|
||||||
|
-->
|
||||||
|
{{ $tagregexH := "#([^#\\s\\,:}]+)#" }}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
======================
|
||||||
|
Tags containing spaces
|
||||||
|
======================
|
||||||
|
|
||||||
|
#mytag/with espaces#
|
||||||
|
-->
|
||||||
|
{{ $tagregexS := "#([^\\s^#][^#]*[^\\s^#])#" }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
============
|
||||||
|
Regular tags
|
||||||
|
============
|
||||||
|
|
||||||
|
#mytag
|
||||||
|
#mytag/could/be/nested
|
||||||
|
-->
|
||||||
|
{{ $tagregex := "[^/a-z]#([^#\\s\\,:}]+)" }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexN "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>\n" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexS "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexH "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregex "\n<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
======================
|
||||||
|
Misc regex replacement
|
||||||
|
======================
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $rightArrow := "<svg width=\"11px\" height=\"10px\" viewBox=\"0 0 11 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ><g id=\"right-arrow\" ><path d=\"M1.77635684e-14,5 L9,5\" id=\"rod\" stroke=\"#000000\" stroke-width=\"2\" ></path><path d=\"M11,5 L6,0.5 L6,9.5 L11,5 Z\" id=\"point\" fill=\"#000000\"></path></g></svg>" }}
|
||||||
|
|
||||||
|
{{ $leftArrow := "<svg width=\"11px\" height=\"10px\" viewBox=\"0 0 11 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <g id=\"left-arrow\" transform=\"translate(5.500000, 5.000000) scale(-1, 1) translate(-5.500000, -5.000000) \"> <path d=\"M1.77635684e-14,5 L9,5\" id=\"rod\" stroke=\"#000000\" stroke-width=\"2\"></path> <path d=\"M11,5 L6,0.5 L6,9.5 L11,5 Z\" id=\"point\" fill=\"#000000\"></path></g></svg>" }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE "->" $rightArrow }}
|
||||||
|
{{ $content := $content | replaceRE "<-" $leftArrow }}
|
||||||
|
{{ $content := $content | replaceRE "::([^/]+?)::" "<mark>$1</mark>" }}
|
||||||
|
{{ $content := $content | replaceRE "==([^/]+?)==" "<mark>$1</mark>" }}
|
||||||
|
{{ $content | markdownify }}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
<!--
|
||||||
|
|
||||||
|
=======
|
||||||
|
Wiklinks
|
||||||
|
=======
|
||||||
|
-->
|
||||||
|
{{ $firstBracket := "\\[\\[" }}
|
||||||
|
{{ $lastBracket := "\\]\\]" }}
|
||||||
|
|
||||||
|
{{ $wikiregex := "\\[\\[([^/]+?)\\]\\]" }}
|
||||||
|
|
||||||
|
{{ $wikilinks := .Content | findRE $wikiregex }}
|
||||||
|
|
||||||
|
{{ $.Scratch.Add "content" .RawContent }}
|
||||||
|
|
||||||
|
{{ range $wikilinks }}
|
||||||
|
|
||||||
|
{{ $content := . | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $content := $content | replaceRE "\\?" "\\?" }}
|
||||||
|
|
||||||
|
{{ $wikilink := printf "%s%s%s" $firstBracket $content $lastBracket }}
|
||||||
|
|
||||||
|
{{ $anchorized := $content | anchorize }}
|
||||||
|
|
||||||
|
{{ $link := printf "%s%s%s%s%s%s" "<a href=\"" $anchorized ".html" "\">" $content "</a>" }}
|
||||||
|
|
||||||
|
{{ $noteContent := $.Scratch.Get "content" | replaceRE $wikilink $link }}
|
||||||
|
{{ $.Scratch.Set "content" $noteContent }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $content := .Scratch.Get "content" }}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
====
|
||||||
|
TAGS
|
||||||
|
====
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
===================================
|
||||||
|
Regular tags followed by a new line
|
||||||
|
===================================
|
||||||
|
|
||||||
|
#mytag/with-no-espaces
|
||||||
|
|
||||||
|
New line
|
||||||
|
-->
|
||||||
|
{{ $tagregexN := "#([^#\\s\\,:}]+)\\n" }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
===================================
|
||||||
|
Regular tags followed by a hashtag
|
||||||
|
===================================
|
||||||
|
|
||||||
|
#mytag/with-no-espaces
|
||||||
|
|
||||||
|
New line
|
||||||
|
-->
|
||||||
|
{{ $tagregexH := "#([^#\\s\\,:}]+)#" }}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
======================
|
||||||
|
Tags containing spaces
|
||||||
|
======================
|
||||||
|
|
||||||
|
#mytag/with espaces#
|
||||||
|
-->
|
||||||
|
{{ $tagregexS := "#([^\\s^#][^#]*[^\\s^#])#" }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
============
|
||||||
|
Regular tags
|
||||||
|
============
|
||||||
|
|
||||||
|
#mytag
|
||||||
|
#mytag/could/be/nested
|
||||||
|
-->
|
||||||
|
{{ $tagregex := "[^/a-z]#([^#\\s\\,:}]+)" }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexN "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>\n" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexS "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregexH "<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
{{ $content := $content | replaceRE $tagregex "\n<a class=\"hashtag\" onclick=\"focusTag(this)\">$1</a>" | safeHTML }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
======================
|
||||||
|
Misc regex replacement
|
||||||
|
======================
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $rightArrow := "<svg width=\"11px\" height=\"10px\" viewBox=\"0 0 11 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ><g id=\"right-arrow\" ><path d=\"M1.77635684e-14,5 L9,5\" id=\"rod\" stroke=\"#000000\" stroke-width=\"2\" ></path><path d=\"M11,5 L6,0.5 L6,9.5 L11,5 Z\" id=\"point\" fill=\"#000000\"></path></g></svg>" }}
|
||||||
|
|
||||||
|
{{ $leftArrow := "<svg width=\"11px\" height=\"10px\" viewBox=\"0 0 11 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <g id=\"left-arrow\" transform=\"translate(5.500000, 5.000000) scale(-1, 1) translate(-5.500000, -5.000000) \"> <path d=\"M1.77635684e-14,5 L9,5\" id=\"rod\" stroke=\"#000000\" stroke-width=\"2\"></path> <path d=\"M11,5 L6,0.5 L6,9.5 L11,5 Z\" id=\"point\" fill=\"#000000\"></path></g></svg>" }}
|
||||||
|
|
||||||
|
{{/* $content := $content | replaceRE "->" $rightArrow */}}
|
||||||
|
{{/* $content := $content | replaceRE "<-" $leftArrow */}}
|
||||||
|
{{/* $content := $content | replaceRE "::([^/]+?)::" "<mark>$1</mark>" */}}
|
||||||
|
{{/* $content := $content | replaceRE "==([^/]+?)==" "<mark>$1</mark>" */}}
|
||||||
|
|
||||||
|
{{ $optBlock := dict "display" "block" }}
|
||||||
|
{{/*$content | .RenderString $optBlock*/}}
|
||||||
|
{{.Content}}
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
<style>
|
||||||
|
menu { display: block; }
|
||||||
|
#menu {
|
||||||
|
height: 100%;
|
||||||
|
width: 250px;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--dark-background-color);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 1;
|
||||||
|
color: white;
|
||||||
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
padding: 8px;
|
||||||
|
padding-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li {
|
||||||
|
margin: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a {
|
||||||
|
color: white;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li {
|
||||||
|
text-indent: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: end;
|
||||||
|
padding: 6px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li:hover, .selected {
|
||||||
|
background: var(--note-table-cell-ribbon-color);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul ul {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul span {
|
||||||
|
display: flex;
|
||||||
|
margin-left: 32px;
|
||||||
|
}
|
||||||
|
menu {
|
||||||
|
--menu-text-color: var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#menu svg {
|
||||||
|
fill: var(--menu-text-color);
|
||||||
|
margin-right: 12px;
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu .chevron {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var showsMenu = false;
|
||||||
|
function display(li) {
|
||||||
|
const inside_list = document.getElementById('menu-sublist');
|
||||||
|
|
||||||
|
if (showsMenu) {
|
||||||
|
inside_list.style.display = "none";
|
||||||
|
showsMenu = false;
|
||||||
|
} else {
|
||||||
|
inside_list.style.display = "block";
|
||||||
|
showsMenu = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<menu id="menu">
|
||||||
|
<ul>
|
||||||
|
<li onclick="display(this)"><svg class="chevron chevron-right" width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="var(--menu-text-color)" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
|
||||||
|
<svg class="chevron-down" style="display:none" width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="var(--menu-text-color)" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect fill="none" stroke="var(--menu-text-color)" width="13" height="17" x="3.5" y="1.5"></rect><line fill="none" stroke="var(--menu-text-color)" x1="6" x2="12" y1="12.5" y2="12.5"></line><line fill="none" stroke="var(--menu-text-color)" x1="6" x2="14" y1="8.5" y2="8.5"></line><line fill="none" stroke="var(--menu-text-color)" x1="6" x2="14" y1="6.5" y2="6.5"></line><line fill="none" stroke="var(--menu-text-color)" x1="6" x2="14" y1="10.5" y2="10.5"></line></svg> Notes
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<ul id="menu-sublist">
|
||||||
|
<li><span><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="var(--menu-text-color)" stroke-width="1.1" d="M17.5,3.71 L17.5,7.72 C17.5,7.96 17.4,8.2 17.21,8.39 L8.39,17.2 C7.99,17.6 7.33,17.6 6.93,17.2 L2.8,13.07 C2.4,12.67 2.4,12.01 2.8,11.61 L11.61,2.8 C11.81,2.6 12.08,2.5 12.34,2.5 L16.19,2.5 C16.52,2.5 16.86,2.63 17.11,2.88 C17.35,3.11 17.48,3.4 17.5,3.71 L17.5,3.71 Z"></path><circle cx="14" cy="6" r="1"></circle></svg>Non tagué</span></li>
|
||||||
|
<li><span><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><ellipse fill="none" stroke="var(--menu-text-color)" cx="6.11" cy="3.55" rx="2.11" ry="2.15"></ellipse><ellipse fill="none" stroke="var(--menu-text-color)" cx="6.11" cy="15.55" rx="2.11" ry="2.15"></ellipse><circle fill="none" stroke="var(--menu-text-color)" cx="13.15" cy="9.55" r="2.15"></circle><rect x="1" y="3" width="3" height="1"></rect><rect x="10" y="3" width="8" height="1"></rect><rect x="1" y="9" width="8" height="1"></rect><rect x="15" y="9" width="3" height="1"></rect><rect x="1" y="15" width="3" height="1"></rect><rect x="10" y="15" width="8" height="1"></rect></svg>Todo</span></li>
|
||||||
|
<li><span><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect fill="none" stroke="var(--menu-text-color)" height="10" width="13" y="8.5" x="3.5"></rect><path fill="none" stroke="var(--menu-text-color)" d="M6.5,8 L6.5,4.88 C6.5,3.01 8.07,1.5 10,1.5 C11.93,1.5 13.5,3.01 13.5,4.88 L13.5,8"></path></svg>Verouillés</span></li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
<ul id="tags">
|
||||||
|
<li>
|
||||||
|
<svg class="chevron" width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="var(--menu-text-color)" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
|
||||||
|
<svg class="hashtag-icon" width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.431,8 L15.661,7 L12.911,7 L13.831,3 L12.901,3 L11.98,7 L9.29,7 L10.21,3 L9.281,3 L8.361,7 L5.23,7 L5,8 L8.13,8 L7.21,12 L4.23,12 L4,13 L6.98,13 L6.061,17 L6.991,17 L7.911,13 L10.601,13 L9.681,17 L10.611,17 L11.531,13 L14.431,13 L14.661,12 L11.76,12 L12.681,8 L15.431,8 Z M10.831,12 L8.141,12 L9.061,8 L11.75,8 L10.831,12 Z"></path></svg> 1</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</menu>
|
|
@ -0,0 +1,135 @@
|
||||||
|
<!--
|
||||||
|
@niceth: Nice to have
|
||||||
|
- Thumbnails of notes images inside search (regex out from .Content variable)
|
||||||
|
- Caching of index.json to load it once
|
||||||
|
- ctr + k instead of cmd ?
|
||||||
|
- Focused current note
|
||||||
|
-->
|
||||||
|
<style>
|
||||||
|
search-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: var(--background-search);
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-right: 1px solid var(--separator-color);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
}
|
||||||
|
|
||||||
|
#search::-webkit-scrollbar { display: none; }
|
||||||
|
|
||||||
|
#search-header {
|
||||||
|
padding: 12px;
|
||||||
|
position: fixed;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
background: var(--background-search);
|
||||||
|
width: 250px;
|
||||||
|
opacity: 1;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search .input-container {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 16px;
|
||||||
|
background-color: white;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-input:focus {
|
||||||
|
border: 1px solid var(--search-field-focused-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-header .input-container .search-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 8px;
|
||||||
|
fill: darkGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results img {
|
||||||
|
width: 122px;
|
||||||
|
height: 76px;
|
||||||
|
border: 1px solid var(--separator-color);
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results {
|
||||||
|
margin-top: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
color: var(--text-base-color);
|
||||||
|
border-bottom: 1px solid var(--separator-color);
|
||||||
|
border-left: 6px solid var(--background-search);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-results a:first-child:hover, a:first-child:focus, .selected {
|
||||||
|
outline: 0;
|
||||||
|
background-color: var(--note-table-cell-selected-color);
|
||||||
|
border-left: 6px solid var(--note-table-cell-ribbon-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reseting default styles inside search component scope
|
||||||
|
#search-results li { text-indent: 0; }
|
||||||
|
#search-results li:before,
|
||||||
|
#search-results h1:before,
|
||||||
|
#search-results h2:before,
|
||||||
|
#search-results h3:before,
|
||||||
|
#search-results h4:before,
|
||||||
|
#search-results h5:before,
|
||||||
|
#search-results h6:before {
|
||||||
|
content: "";
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<search-menu id="search" data-turbolinks-permanent>
|
||||||
|
<header id="search-header">
|
||||||
|
<div class="input-container">
|
||||||
|
<svg aria-hidden="true" style="" class="search-icon" width="12" height="12" viewBox="0 0 18 18">
|
||||||
|
<path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="search" autocomplete="off" id="search-input" onkeyup="performSearch()" tabindex="0" placeholder="Search note">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ul id="search-results"></ul>
|
||||||
|
</search-menu>
|
|
@ -0,0 +1,32 @@
|
||||||
|
{{ if .Site.IsServer }}
|
||||||
|
<style>
|
||||||
|
fail {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 100;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(47, 30, 46, 1);
|
||||||
|
/* color: #e7e9db; */
|
||||||
|
color: #ef6155;
|
||||||
|
padding: 24px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fail span {
|
||||||
|
color: #48b685;
|
||||||
|
/* color: #f99b15; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<fail>
|
||||||
|
{{ $failed := .Scratch.Get "failed" }}
|
||||||
|
<p>Failing tests:</p>
|
||||||
|
<ul>
|
||||||
|
{{ range $failed }}
|
||||||
|
<li>{{ . }}</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</fail>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1 @@
|
||||||
|
{{ partial "tests/wikilinks.html" . }}
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Tags
|
||||||
|
|
||||||
|
### Cases
|
||||||
|
|
||||||
|
#regular-tag
|
||||||
|
|
||||||
|
#tag-ended-with-numeral#
|
||||||
|
|
||||||
|
#tag ended with numeral with espaces#
|
||||||
|
|
||||||
|
#nested-tag/without-spaces
|
||||||
|
|
||||||
|
#nested-tag/without-spaces/ended-with-numeral#
|
||||||
|
|
||||||
|
#nested tag/with espaces#
|
||||||
|
|
||||||
|
#3/ideas #1/el camino/cualidades/claridad# #1/el camino/principios/minimalismo# #2/aprendizaje
|
||||||
|
|
||||||
|
Dado que [[Bruce Lee le temía al hombre que ha practicado 1 golpe diez mil veces]], que [[Hay que aprender más de menos]] y que [[No puedes tener 10 prioridades si quieres evitar la mediocridad]], se me ocurre la idea de establecer, para cada área de interés 1 ejercicio único.
|
||||||
|
|
||||||
|
Pellentesque diam massa, condimentum id aliquet id, mollis et nibh. Ut id nibh dapibus, pretium ligula a, dictum nisi. Vestibulum maximus dapibus purus vitae congue. Phasellus nec mauris vitae sapien varius pharetra. Mauris eros magna, porttitor in elementum sit amet, euismod eu ipsum. Suspendisse ut mollis enim. Mauris eget consequat sem, eu egestas purus. Maecenas tempus scelerisque urna, et luctus ligula. Suspendisse in quam et augue rhoncus finibus. Sed posuere neque et tellus faucibus iaculis. Vivamus convallis diam lorem, id feugiat urna consectetur in. Sed a tortor vel dolor mattis varius vitae nec odio. Vivamus condimentum purus quis urna ultricies, nec blandit orci iaculis. Donec suscipit ac magna et rhoncus. Nullam varius pellentesque lorem, et aliquet magna eleifend sit amet.
|
|
@ -0,0 +1,183 @@
|
||||||
|
{{ $wikiregex := "\\[\\[([^/]+?)\\]\\]" }}
|
||||||
|
{{ .Scratch.Add "failed" slice }}
|
||||||
|
|
||||||
|
<!-- Test Regular wikilink -->
|
||||||
|
{{ $content := "[[wikilink]]"}}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "wikilink" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Regular wikilinks" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink inside a paragraph -->
|
||||||
|
{{ $content := "this is a [[wikilink]] inside some paragraph" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "this is a wikilink inside some paragraph" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilinks inside paragraph" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink with spaces -->
|
||||||
|
{{ $content := "[[wikilink with spaces]]" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "wikilink with spaces" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilinks with spaces" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink with spaces inside paragraph -->
|
||||||
|
{{ $content := "this is a [[wikilink with spaces]] inside some paragraph" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "this is a wikilink with spaces inside some paragraph" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Spaced wikilink inside paragraph" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
===============
|
||||||
|
Special symbols
|
||||||
|
===============
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Wikilink with question marks -->
|
||||||
|
{{ $content := "[[¿wikilink?]]" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "¿wikilink?" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilinks with question marks" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink with question marks and spaces -->
|
||||||
|
{{ $content := "[[¿wikilink with spaces?]]" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "¿wikilink with spaces?" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilink with question marks and spaces" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink with colons -->
|
||||||
|
{{ $content := "[[wikilink:colons]]" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "wikilink:colons" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilink with colons" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Wikilink with colons and spaces -->
|
||||||
|
{{ $content := "[[wikilink with colons and: spaces]]" }}
|
||||||
|
{{ $result := $content | replaceRE $wikiregex "$1" }}
|
||||||
|
{{ $expectaction := "wikilink with colons and: spaces" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ .Scratch.Add "failed" "Wikilink with colons and spaces" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
========================
|
||||||
|
Debugging special symbols
|
||||||
|
========================
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Capturing character with dot -->
|
||||||
|
{{ $content := "t" }}
|
||||||
|
{{ $regex := "." }}
|
||||||
|
|
||||||
|
{{ $result := $content | findRE $regex }}
|
||||||
|
{{ $result := index $result 0 }}
|
||||||
|
{{ $expectaction := "t" }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ $.Scratch.Add "failed" "Failied capturing single character with dot" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Capturing all characters with dot -->
|
||||||
|
{{ $content := "this whole sentence should be captured" }}
|
||||||
|
{{ $regex := "." }}
|
||||||
|
|
||||||
|
{{ $result := $content | findRE $regex }}
|
||||||
|
{{ $result := index $result 0 }}
|
||||||
|
{{ $expect := $content }}
|
||||||
|
|
||||||
|
{{ if ne $expectaction $result }}
|
||||||
|
{{ $.Scratch.Add "failed" "Whole sentence captured by dot" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end}}
|
||||||
|
|
||||||
|
<!-- Capturing special characters with dot -->
|
||||||
|
{{ $content := "&¿?/'`:+$*" }}
|
||||||
|
{{ $regex := "." }}
|
||||||
|
{{ $expect := $content }}
|
||||||
|
|
||||||
|
{{ $result := $content }}
|
||||||
|
{{ if ne $expect $result }}
|
||||||
|
{{ $.Scratch.Add "failed" "Capturing special characters with dot" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Capturing exact match for wikilink -->
|
||||||
|
{{ $target := "\\[\\[wikilink\\]\\]" }}
|
||||||
|
{{ $content := "this text contains a [[wikilink]] "}}
|
||||||
|
{{ $expect := "[[wikilink]]" }}
|
||||||
|
|
||||||
|
{{ $result := $content | findRE $target }}
|
||||||
|
{{ $result := index $result 0 }}
|
||||||
|
|
||||||
|
{{ if ne $result $expect }}
|
||||||
|
{{ $.Scratch.Add "failed" "Capture exact wikilink match" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Capturing exact match for wikilink with special symbol -->
|
||||||
|
{{ $target := "\\[\\[wikilink\\?\\]\\]" }}
|
||||||
|
{{ $content := "this text contains a [[wikilink?]] "}}
|
||||||
|
{{ $expect := "[[wikilink?]]" }}
|
||||||
|
|
||||||
|
{{ $result := $content | findRE $target }}
|
||||||
|
{{ $result := index $result 0 }}
|
||||||
|
|
||||||
|
{{ if ne $result $expect }}
|
||||||
|
{{ $.Scratch.Add "failed" "Capture exact wikilink match" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Replace "?" with empty space -->
|
||||||
|
{{ $target := "?" }}
|
||||||
|
{{ $result := $target | replaceRE "\\?" " " }}
|
||||||
|
{{ $expect := " " }}
|
||||||
|
|
||||||
|
{{ if ne $expect $result }}
|
||||||
|
{{ $.Scratch.Add "failed" "Capturing single question mark" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Adding escaping characters to "?" -->
|
||||||
|
{{ $target := "?" }}
|
||||||
|
{{ $result := $target | replaceRE "\\?" "\\\\?" }}
|
||||||
|
{{ $expect := "\\\\?" }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ if ne $expect $result }}
|
||||||
|
{{ $.Scratch.Add "failed" "Adding escaping slashes to ? character" }}
|
||||||
|
{{ partial "tests/fail.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
opacity: 0.5;
|
||||||
|
|
||||||
|
padding: 18px 0px 18px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toolbar:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close-nav-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<aside id="toolbar">
|
||||||
|
<span style="cursor:pointer" id="open-nav-icon" onclick="handleNavVisibility()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="var(--text-base-color)" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="var(--text-base-color)" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span onclick="imageMode()" style="cursor:pointer;margin-top:16px;">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="var(--text-base-color" x=".5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="var(--text-base-color" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="var(--text-base-color)" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||||
|
</span>
|
||||||
|
</aside>
|
|
@ -0,0 +1,18 @@
|
||||||
|
{{$file := .Get 0}}
|
||||||
|
{{$extension := ".md" }}
|
||||||
|
{{ $filename := trim $file $extension }}
|
||||||
|
|
||||||
|
{{ $wikiregex := "\\[\\[([^/]+)\\]\\]" }}
|
||||||
|
|
||||||
|
<div class="transcluded-container" style="position: relative;">
|
||||||
|
{{ with .Site.GetPage $file }}
|
||||||
|
<p class="view-transcluded hidden" style="position: absolute;top: 10px;left: -10px;"><a href="{{ .Permalink }}">🔗</a></p>
|
||||||
|
<a class="hover:bg-green-100 rounded-md block mt-4"href="{{ .Permalink }}">
|
||||||
|
<!-- We add the content of the transcluded note and replace the footnotes clases in order to hide them. We replace the transcluded notes wikilinks -->
|
||||||
|
{{ .Content | replaceRE "footnotes" "transcluded-footnotes" | replaceRE "footnote-ref" "transcluded-footnote-ref" | replaceRE "fn" "transcluded-fn" | replaceRE $wikiregex "transcluded-wikilink" | markdownify }}
|
||||||
|
</a>
|
||||||
|
<!-- We add a hidden wikilink because we want the transcluding page to be shown as a backlink -->
|
||||||
|
<p style="display: none;">[[{{ $filename }}]]</p>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{{ partial (.Get 0) }}
|
|
@ -0,0 +1 @@
|
||||||
|
{{ len (where .Site.RegularPages "Section" "==" "notes") }}
|
|
@ -0,0 +1,13 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1>{{.Title}}</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{ range .Pages }}
|
||||||
|
<a href="{{.Permalink | relURL }}"><span class="tag tag-{{anchorize .Title}} tag-lg">#{{ anchorize .Title}}</span></a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,13 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1>{{.Title}}</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li><a href="{{.Permalink | relURL }}"><span class="tag tag-{{anchorize .Title}} tag-lg">#{{ anchorize .Title}}</span></a></li>
|
||||||
|
{{ end }}</ol>
|
||||||
|
|
||||||
|
{{ end }}
|
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 166 KiB |
|
@ -0,0 +1,16 @@
|
||||||
|
# theme.toml template for a Hugo theme
|
||||||
|
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||||
|
|
||||||
|
name = "Zettels"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "@todo"
|
||||||
|
description = "@todo"
|
||||||
|
homepage = "https://notas.cristian.lat"
|
||||||
|
tags = ["bear", "digital garden", "zettelkasten", "note taking"]
|
||||||
|
features = ["wikilinks", "backlinks", "bear alike tag system"]
|
||||||
|
min_version = "0.0.1"
|
||||||
|
assetsDir = "assets"
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "Cristian Felipe Patiño Rojas"
|
||||||
|
homepage = "https://cristian.lat"
|
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 18 KiB |