You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/usage/equations.md
-84Lines changed: 0 additions & 84 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,69 +89,6 @@ u = [Dirichlet();
89
89
u(0.1)
90
90
```
91
91
92
-
## Eigenvalue Problems
93
-
94
-
In analogy to linear algebra, many differential equations may be posed as eigenvalue problems. That is, for some differential operator ``\mathop{L}``, there are a family of functions ``\mathop{u}_i(x)`` such that
95
-
96
-
```math
97
-
\mathop{L} \mathop{u}_i(x) = λ_i \mathop{u}_i(x),
98
-
```
99
-
100
-
where ``λ_i`` is the ``i^{th}`` eigenvalue of the ``L`` and has a corresponding *eigenfunction*``\mathop{u}_i(x)``. A classic eigenvalue problem is known as the quantum harmonic oscillator where
and one demands that ``\mathop{u}(∞) = \mathop{u}(-∞) = 0``. Because we expect the solutions to be exponentially suppressed for large ``x``, we can approximate this with Dirichlet boundary conditions at a 'reasonably large' ``x`` without much difference.
107
-
108
-
We can express this in ApproxFun as the following:
109
-
110
-
```julia
111
-
x =Fun(-8..8)
112
-
L =-𝒟^2/2+ x^2/2
113
-
S =space(x)
114
-
B =Dirichlet(S)
115
-
λ, v = ApproxFun.eigs(B, L, 500,tolerance=1E-10)
116
-
```
117
-
118
-
Note that boundary conditions must be specified in the call to `eigs`. Plotting the first ``20`` eigenfunctions offset vertically by their eigenvalue, we see
119
-
120
-

121
-
122
-
If the solutions are not relatively constant near the boundary then one should push the boundaries further out.
123
-
124
-
For problems with different contraints or boundary conditions, `B` can be any zero functional constraint, e.g., `DefiniteIntegral()`.
125
-
126
-
## Systems of equations
127
-
128
-
Systems of equations can be handled by creating a matrix of operators and functionals. For example, we can solve the system
In this example, the automatic space detection failed and so we needed to specify explicitly that the domain space for `B` is `Chebyshev()`.
154
-
155
92
## QR Factorization
156
93
157
94
Behind the scenes, `A\b` where `A` is an `Operator` is implemented via an adaptive QR factorization. That is, it is equivalent to `qr(A)\b`. (There is a subtlety here in space inferring: `A\b` can use both `A` and `b` to determine the domain space, while `qr(A)` only sees the operator `A`.) Note that `qr` adaptively caches a partial QR Factorization
@@ -184,24 +121,3 @@ Many PDEs have weak singularities at the corners, in which case it is beneficial
184
121
```julia
185
122
\(A, [zeros(∂(d));f]; tolerance=1E-6)
186
123
```
187
-
188
-
## Nonlinear equations
189
-
190
-
There is preliminary support for nonlinear equations, via Newton iteration in function space. Here is a simple two-point boundary value problem:
0 commit comments