Skip to content

Commit 56978ad

Browse files
committed
Update TeX formatting
Fix up whitespace and delimiters in both source and render
1 parent ea81457 commit 56978ad

File tree

8 files changed

+129
-83
lines changed

8 files changed

+129
-83
lines changed

lib/BVProblemLibrary/src/linear.jl

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Linear boundary value problem with analytical solution, given by
3636
with boundary condition
3737
3838
```math
39-
y_1(0)=1, y_1(1)=0
39+
y_1(0)=1, \;\; y_1(1)=0
4040
```
4141
4242
# Solution
@@ -94,7 +94,7 @@ Linear boundary value problem with analytical solution, given by
9494
with boundary condition
9595
9696
```math
97-
y_1(0)=1, y_1(1)=0
97+
y_1(0)=1, \;\; y_1(1)=0
9898
```
9999
100100
# Solution
@@ -155,13 +155,13 @@ Linear boundary value problem with analytical solution, given by
155155
where
156156
157157
```math
158-
f(t, y_1, y_2) = -(2+\cos(\pi t))y_2 + y_1 -(1+\lambda \pi^2)\cos(\pi t) - (2+\cos(\pi t))\pi\sin(\pi t)
158+
f(t, y_1, y_2) = -[2+\cos(\pi t)]y_2 + y_1 -(1+\lambda \pi^2)\cos(\pi t) - [2+\cos(\pi t)]\pi\sin(\pi t)
159159
```
160160
161161
with boundary condition
162162
163163
```math
164-
y_1(-1)=-1, y_1(1)=-1
164+
y_1(-1)=-1,\;\; y_1(1)=-1
165165
```
166166
167167
# Solution
@@ -219,7 +219,7 @@ Linear boundary value problem with analytical solution, given by
219219
where
220220
221221
```math
222-
f(y_1, y_2)=-y2+(1+\lambda)y1
222+
f(y_1, y_2) = -y_2 + (1+\lambda) y_1
223223
```
224224
225225
with boundary condition
@@ -288,13 +288,13 @@ Linear boundary value problem with analytical solution, given by
288288
where
289289
290290
```math
291-
f(t, y_1, y_2)=ty_2+y_1-(1+\lambda\pi^2)\cos(\pi t)+\pi t\sin(\pi t)
291+
f(t, y_1, y_2) = ty_2 + y_1 - (1+\lambda\pi^2)\cos(\pi t) + \pi t\sin(\pi t)
292292
```
293293
294294
with boundary condition
295295
296296
```math
297-
y_1(-1)=-1, y_1(1)=-1
297+
y_1(-1)=-1, \;\; y_1(1)=-1
298298
```
299299
300300
# Solution
@@ -353,13 +353,13 @@ Linear boundary value problem with analytical solution, given by
353353
where
354354
355355
```math
356-
f(t, y_2)=ty_2 - \lambda\pi^2\cos(\pi t)-\pi t\sin(\pi t)
356+
f(t, y_2) = ty_2 - \lambda\pi^2\cos(\pi t)-\pi t\sin(\pi t)
357357
```
358358
359359
with boundary condition
360360
361361
```math
362-
y_1(-1)=-2, y_1(1)=0
362+
y_1(-1)=-2, \;\; y_1(1)=0
363363
```
364364
365365
# Solution
@@ -425,13 +425,13 @@ Linear boundary value problem with analytical solution, given by
425425
where
426426
427427
```math
428-
f(t, y_1, y_2)=ty_2+y_1-(1+\lambda\pi^2)\cos(\pi t)+\pi t\sin(\pi t)
428+
f(t, y_1, y_2) = t y_2 + y_1 - (1+\lambda\pi^2)\cos(\pi t) + \pi t\sin(\pi t)
429429
```
430430
431431
with boundary condition
432432
433433
```math
434-
y_1(-1)=-1, y_1(1)=1
434+
y_1(-1)=-1, \;\; y_1(1)=1
435435
```
436436
437437
# Solution
@@ -489,7 +489,7 @@ Linear boundary value problem with analytical solution, given by
489489
with boundary condition
490490
491491
```math
492-
y_1(0)=1, y_1(1)=2
492+
y_1(0)=1, \;\; y_1(1)=2
493493
```
494494
495495
# Solution
@@ -498,7 +498,7 @@ The analytical solution for ``t \in [0, 1]`` is
498498
499499
```math
500500
\begin{align*}
501-
y_1(t) &= (2 - \exp(-1/\lambda) - \exp(-t/\lambda))/(1 - \exp(-1/\lambda)) \\
501+
y_1(t) &= \frac{2 - \exp(-1/\lambda) - \exp(-t/\lambda)}{1 - \exp(-1/\lambda)} \\
502502
y_2(t) &= y_1'(t)
503503
\end{align*}
504504
```
@@ -612,7 +612,7 @@ Linear boundary value problem with analytical solution, given by
612612
with boundary condition
613613
614614
```math
615-
y_1(-1)=0, y_1(1)=2
615+
y_1(-1)=0, \;\; y_1(1)=2
616616
```
617617
618618
# Solution
@@ -670,13 +670,13 @@ Linear boundary value problem with analytical solution, given by
670670
where
671671
672672
```math
673-
f(t, y_1)=y_1-(1+\lambda\pi^2)\cos(\pi t)
673+
f(t, y_1) = y_1 - (1+\lambda\pi^2)\cos(\pi t)
674674
```
675675
676676
with boundary condition
677677
678678
```math
679-
y_1(-1)=0, y_1(1)=2
679+
y_1(-1)=0, \;\; y_1(1)=2
680680
```
681681
682682
# Solution
@@ -736,7 +736,7 @@ Linear boundary value problem with analytical solution, given by
736736
where
737737
738738
```math
739-
f(t, y_1)=y_1-(1+\lambda\pi^2)\cos(\pi t)
739+
f(t, y_1) = y_1 - (1+\lambda\pi^2)\cos(\pi t)
740740
```
741741
742742
with boundary condition
@@ -801,13 +801,13 @@ Linear boundary value problem with analytical solution, given by
801801
where
802802
803803
```math
804-
f(t, y_1)=y_1-(1+\lambda\pi^2)\cos(\pi t)
804+
f(t, y_1) = y_1 - (1+\lambda\pi^2)\cos(\pi t)
805805
```
806806
807807
with boundary condition
808808
809809
```math
810-
y_1(-1)=0, y_1(1)=-1
810+
y_1(-1)=0, \;\; y_1(1)=-1
811811
```
812812
813813
# Solution
@@ -872,7 +872,8 @@ f(t, y_1)=y_1-(1+\lambda\pi^2)\cos(\pi t)
872872
with boundary condition
873873
874874
```math
875-
y_1(-1)=\exp(-2/\sqrt{\lambda}, y_1(1)=\exp(-2/\sqrt{\lambda})
875+
y_1(-1) = \exp(-2/\sqrt{\lambda}), \;\;
876+
y_1(1) = \exp(-2/\sqrt{\lambda})
876877
```
877878
878879
# Solution
@@ -927,7 +928,7 @@ Linear boundary value problem with analytical solution, given by
927928
with boundary condition
928929
929930
```math
930-
y_1(-1)=1, y_1(1)=1
931+
y_1(-1)=1, \;\; y_1(1)=1
931932
```
932933
933934
# Solution
@@ -978,13 +979,13 @@ Linear boundary value problem with analytical solution, given by
978979
where
979980
980981
```math
981-
f(t, y_1)=-π^2y_1/4
982+
f(t, y_1) = -π^2 y_1/4
982983
```
983984
984985
with boundary condition
985986
986987
```math
987-
y_1(0)=0, y_1(1)=\sin(\pi/(2*\lambda))
988+
y_1(0)=0, \;\; y_1(1)=\sin(\pi/(2\lambda))
988989
```
989990
990991
# Solution
@@ -1041,13 +1042,14 @@ Linear boundary value problem with analytical solution, given by
10411042
where
10421043
10431044
```math
1044-
f(t, y_1)=-3\lambda y_1/(\lambda+t^2)^2
1045+
f(t, y_1) = -3\lambda y_1 / (\lambda+t^2)^2
10451046
```
10461047
10471048
with boundary condition
10481049
10491050
```math
1050-
y_1(-0.1)=-0.1/\sqrt{\lambda+0.01}, y_1(0.1)=0.1/\sqrt{\lambda+0.01}
1051+
y_1(-0.1) = \frac{-0.1}{\sqrt{\lambda+0.01}},
1052+
y_1(0.1) = \frac{ 0.1}{\sqrt{\lambda+0.01}}
10511053
```
10521054
10531055
# Solution
@@ -1105,7 +1107,7 @@ Linear boundary value problem with analytical solution, given by
11051107
with boundary condition
11061108
11071109
```math
1108-
y_1(0)=1, y_1(1)=0.1/\sqrt{\lambda+0.01}
1110+
y_1(0)=1, \;\; y_1(1)=\frac{0.1}{\sqrt{\lambda+0.01}}
11091111
```
11101112
11111113
# Solution

lib/BVProblemLibrary/src/nonlinear.jl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Nonlinear boundary value problem with analytical solution, given by
164164
where
165165
166166
```math
167-
f(y_1)=y_1+y_1^2-\exp(-2t/\sqrt{\lambda})
167+
f(y_1) = y_1 + y_1^2 - \exp(-2t/\sqrt{\lambda})
168168
```
169169
170170
with boundary condition
@@ -279,7 +279,7 @@ Nonlinear boundary value problem with no analytical solution, given by
279279
where
280280
281281
```math
282-
f(y_1)=\lambda\sinh(\lambda z)
282+
f(y_1) = \lambda\sinh(\lambda z)
283283
```
284284
285285
with boundary condition
@@ -339,13 +339,13 @@ The steady state Navier-Stokes equations generate a second order differential eq
339339
where
340340
341341
```math
342-
f(t, y_1, y_2)=(\frac{1+\gamma}{2}-\lambda A'(t))y_1y_2-\frac{y_2}{y_1}-\frac{A'(t)}{A(t)}(1-(\frac{\gamma-1}{2})y_1^2)
342+
f(t, y_1, y_2) = \left(\frac{1+\gamma}{2}-\lambda A'(t)\right) y_1y_2 - \frac{y_2}{y_1} - \frac{A'(t)}{A(t)} \left(1 - \frac{\gamma-1}{2} y_1^2\right)
343343
```
344344
345345
with boundary condition
346346
347347
```math
348-
y_1(0)=0.9129, y_1(1)=0.375
348+
y_1(0)=0.9129, \;\; y_1(1)=0.375
349349
```
350350
351351
# Solution
@@ -393,13 +393,13 @@ Nonlinear boundary value problem with no analytical solution, given by
393393
where
394394
395395
```math
396-
f(y_1, y_2)=-y_1y_2+y_1
396+
f(y_1, y_2) = -y_1 y_2 + y_1
397397
```
398398
399399
with boundary condition
400400
401401
```math
402-
y_1(0)=-1/3, y_1(1)=1/3
402+
y_1(0)=-1/3, \;\; y_1(1)=1/3
403403
```
404404
405405
# Solution
@@ -453,7 +453,7 @@ f(y_1, y_2)=-y_1y_2+y_1
453453
with boundary condition
454454
455455
```math
456-
y_1(0)=1, y_1(1)=-1/3
456+
y_1(0)=1, \;\; y_1(1)=-1/3
457457
```
458458
459459
# Solution
@@ -561,7 +561,7 @@ f(y_1, y_2)=-y_1y_2+y_1
561561
with boundary condition
562562
563563
```math
564-
y_1(0)=1, y_1(1)=3/2
564+
y_1(0)=1, \;\; y_1(1)=3/2
565565
```
566566
567567
# Solution
@@ -615,7 +615,7 @@ f(y_1, y_2)=-y_1y_2+y_1
615615
with boundary condition
616616
617617
```math
618-
y_1(0)=0, y_1(1)=3/2
618+
y_1(0)=0, \;\; y_1(1)=3/2
619619
```
620620
621621
# Solution
@@ -663,13 +663,13 @@ Nonlinear boundary value problem with no analytical solution, given by
663663
where
664664
665665
```math
666-
f(y_1, y_2)=-y_1y_2+y_1
666+
f(y_1, y_2) = -y_1y_2+y_1
667667
```
668668
669669
with boundary condition
670670
671671
```math
672-
y_1(0)=-7/6, y_1(1)=3/2
672+
y_1(0)=-7/6, \;\; y_1(1)=3/2
673673
```
674674
675675
# Solution
@@ -725,13 +725,14 @@ Nonlinear boundary value problem with no analytical solution, given by
725725
where
726726
727727
```math
728-
f(z, \theta, M, Q)=\frac{1}{\lambda}((z-1)\cos\theta-M\sec\theta)+\lambda Q\tan\theta
728+
f(z, \theta, M, Q) = \frac{1}{\lambda} [(z-1)\cos\theta-M\sec\theta] + \lambda Q\tan\theta
729729
```
730730
731731
with boundary condition
732732
733733
```math
734-
y_1(0)=0, y_3(0)=0, y_1(1)=0, y_3(1)=0
734+
y_1(0)=0, \;\; y_3(0)=0, \;\;
735+
y_1(1)=0, \;\; y_3(1)=0
735736
```
736737
737738
# Solution
@@ -787,7 +788,8 @@ Nonlinear boundary value problem with no analytical solution, given by
787788
with boundary condition
788789
789790
```math
790-
y_1(0)=0, y_2(0)=0, y_1(1)=1, y_2(1)=0
791+
y_1(0)=0, \;\; y_2(0)=0, \;\;
792+
y_1(1)=1, \;\; y_2(1)=0
791793
```
792794
793795
# Solution

lib/DAEProblemLibrary/src/DAEProblemLibrary.jl

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,34 @@ du0 = [
6969
@doc doc"""
7070
The Transistor Amplifier model
7171
72-
M\frac{dy}{dt}=f(t,y),\quad y(0)=y_0,\quad y'(0)=y_0'
72+
```math
73+
M\frac{dy}{dt} = f(t,y), \quad y(0)=y_0,\quad y'(0)=y_0'
74+
```
7375
7476
```math
75-
M=\left(\begin{array}{cccccccc}
76-
-C_{1} & C_{1} & 0 & 0 & 0 & 0 & 0 & 0 \\
77-
C_{1} & -C_{1} & 0 & 0 & 0 & 0 & 0 & 0 \\
78-
0 & 0 & -C_{2} & 0 & 0 & 0 & 0 & 0 \\
79-
0 & 0 & 0 & -C_{3} & C_{3} & 0 & 0 & 0 \\
80-
0 & 0 & 0 & C_{3} & -C_{3} & 0 & 0 & 0 \\
81-
0 & 0 & 0 & 0 & 0 & -C_{4} & 0 & 0 \\
82-
0 & 0 & 0 & 0 & 0 & 0 & -C_{5} & C_{5} \\
83-
0 & 0 & 0 & 0 & 0 & 0 & C_{5} & -C_{5}
84-
\end{array}\right)
77+
M = \begin{pmatrix}
78+
-C_1 & C_1 & 0 & 0 & 0 & 0 & 0 & 0 \\
79+
C_1 & -C_1 & 0 & 0 & 0 & 0 & 0 & 0 \\
80+
0 & 0 & -C_2 & 0 & 0 & 0 & 0 & 0 \\
81+
0 & 0 & 0 & -C_3 & C_3 & 0 & 0 & 0 \\
82+
0 & 0 & 0 & C_3 & -C_3 & 0 & 0 & 0 \\
83+
0 & 0 & 0 & 0 & 0 & -C_4 & 0 & 0 \\
84+
0 & 0 & 0 & 0 & 0 & 0 & -C_5 & C_5 \\
85+
0 & 0 & 0 & 0 & 0 & 0 & C_5 & -C_5
86+
\end{pmatrix}
8587
```
8688
8789
```math
88-
f(t, y)=\left(\begin{array}{c}
89-
-\frac{U_{e}(t)}{R_{0}}+\frac{y_{1}}{R_{0}} \\
90-
-\frac{U_{b}}{R_{2}}+y_{2}\left(\frac{1}{R_{1}}+\frac{1}{R_{2}}\right)-(\alpha-1) g\left(y_{2}-y_{3}\right) \\
91-
-g\left(y_{2}-y_{3}\right)+\frac{y_{3}}{R_{3}} \\
92-
-\frac{U_{b}}{R_{4}}+\frac{y_{4}}{R_{4}}+\alpha g\left(y_{2}-y_{3}\right) \\
93-
-\frac{U_{b}}{R_{6}}+y_{5}\left(\frac{1}{R_{5}}+\frac{1}{R_{6}}\right)-(\alpha-1) g\left(y_{5}-y_{6}\right) \\
94-
-g\left(y_{5}-y_{6}\right)+\frac{y_{6}}{R_{7}} \\
95-
-\frac{U_{b}}{R_{8}}+\frac{y_{7}}{R_{8}}+\alpha g\left(y_{5}-y_{6}\right) \\
96-
\frac{y_{8}}{R_{9}}
97-
\end{array}\right)
90+
f(t, y)=\begin{pmatrix}
91+
-\frac{U_e(t)}{R_0} + \frac{y_1}{R_0} \\
92+
-\frac{U_b}{R_2} + y_2\left(\frac{1}{R_1}+\frac{1}{R_2}\right) - (\alpha-1) g\left(y_2-y_3\right) \\
93+
-g\left(y_2-y_3\right) + \frac{y_3}{R_3} \\
94+
-\frac{U_b}{R_4} + \frac{y_4}{R_4} + \alpha g\left(y_2-y_3\right) \\
95+
-\frac{U_b}{R_6} + y_5\left(\frac{1}{R_5}+\frac{1}{R_6}\right) - (\alpha-1) g\left(y_5-y_6\right) \\
96+
-g\left(y_5-y_6\right) + \frac{y_6}{R_7} \\
97+
-\frac{U_b}{R_8} + \frac{y_7}{R_8} + \alpha g\left(y_5-y_6\right) \\
98+
\frac{y_8}{R_9}
99+
\end{pmatrix}
98100
```
99101
100102
## Reference

0 commit comments

Comments
 (0)