SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
snufkin
Topic Author
Posts: 63
Joined: January 25th, 2017, 9:05 am
Location: Cambridge

Inline math

April 21st, 2017, 10:24 pm

It's more of a question; how do I enter an inline math? I can indeed enter \[\frac{\partial V}{\partial t} + \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 S}{\partial S^2} + r S \frac{\partial V}{\partial S} - r V = 0, \] but I cannot (or don't know how) to use a lousy $\varepsilon$ inline!
 
User avatar
ppauper
Posts: 69069
Joined: November 15th, 2001, 1:29 pm

Re: Inline math

April 22nd, 2017, 5:45 am

like this [$]\varepsilon[$] perhaps?

you put a dollar sign inside square brackets either side of the expression

[ $ ] \varepsilon [ $ ]
but with no spaces (and note there is no \  )
 
User avatar
snufkin
Topic Author
Posts: 63
Joined: January 25th, 2017, 9:05 am
Location: Cambridge

Re: Inline math

April 22nd, 2017, 8:15 pm

Thanks ppauper, it's great!
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

September 26th, 2017, 10:05 pm

[$]\frac{\partial^3 u}{\partial x \partial y \partial z} = f[$] 

Anyone know if this PDE has a name?
 
User avatar
ppauper
Posts: 69069
Joined: November 15th, 2001, 1:29 pm

Re: Inline math

September 29th, 2017, 11:25 am

I've never come across [$]\frac{\partial^3 u}{\partial x \partial y \partial z} = f[$], which doesn't mean that it doesn't have a name
if it helps (it probably doesn't) the 2D version is a version of the poisson equation
[$]\nabla^{2}u=f[$] becomes [$]4\frac{\partial^2 u}{\partial z\partial\bar{z}} = f[$] with [$]z=x+iy[$] and [$]\bar{z}=x-iy[$]
 
User avatar
katastrofa
Posts: 6387
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Inline math

September 29th, 2017, 1:51 pm

That's something I would expect to find in the description of a fractal growth patterns in 3D, fluid mixing, amorphous or organic body surface formation, etc.
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

September 30th, 2017, 7:49 am

In all cases it is some kind of hyperbolic PDE. In the case of two independent variables we can transform

[$]\frac{\partial^2 u}{\partial x^2}  - \frac{\partial^2 u}{\partial y^2}[$]

to

[$]\frac{\partial^2 u}{\partial \xi \partial \eta } [$] 

by the change of coordinates

[$]x = (\xi + \eta), y = (\xi - \eta)[$]

Now the open question is if this works in 3 independent variables. Not sure if an uneven number of independent variables carries over.

[$]\frac{\partial^2 u}{\partial x^2} [$] [$] - \frac{\partial^2 u}{\partial y^2}[$] [$] - \frac{\partial^2 u}{\partial z^2}[$]

This PDE looks more benign for some reason

[$]\frac{\partial^2 u}{\partial x^2} [$] [$] - \frac{\partial^2 u}{\partial y^2} - \frac{\partial^2 u}{\partial z^2} - \frac{\partial^2 u}{\partial p^2}[$]

I think applications can be found in anisotropic waves.

// BTW the second derivatives are a bit shifted. It that the way it works here or am I missing a bracket etc?
 
User avatar
ppauper
Posts: 69069
Joined: November 15th, 2001, 1:29 pm

Re: Inline math

October 1st, 2017, 1:29 pm

where I've come across the 2D version is Liouville's equation
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

October 1st, 2017, 4:36 pm

where I've come across the 2D version is Liouville's equation
This is similar; in this case it is a concatenation of 1st order operators
[$]\frac{\partial }{\partial z} - i\frac{\partial }{\partial \overline{z}}[$] and [$]\frac{\partial u}{\partial z} + i\frac{\partial u}{\partial \overline{z}}[$]. This is is the elliptic case. 

The hyperbolic case is similar but in real space.

[$]\frac{\partial^2 u}{\partial x^2}  - \frac{\partial^2 u}{\partial y^2}[$] = [$](\frac{\partial }{\partial x} - \frac{\partial }{\partial {y}})[$]  [$](\frac{\partial u}{\partial x} + \frac{\partial u}{\partial {y}})[$].


Then [$]x = (\xi + \eta), y = (\xi - \eta)[$] leads to [$]\frac{\partial^2 u}{\partial \xi \partial \eta } [$] .

Putting in a convection/drift term seems to cause meltdown fubar.

//
used \overline for complex conjugation, better than \bar?
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

November 5th, 2017, 11:11 am

test

[$]\displaystyle\lim_{n\to\infty} (1 + r/n)^{nt}[$]
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

February 8th, 2018, 9:16 pm

A good friend is trying to create _general_ bidiagobnal matrix in LATEX

https://en.wikipedia.org/wiki/Bidiagonal_matrix

(with difficulty). Any templates for this?

Tridiagonal matrices are OK 
 
User avatar
ppauper
Posts: 69069
Joined: November 15th, 2001, 1:29 pm

Re: Inline math

February 10th, 2018, 11:17 am

 what exactly do you want, a lot of the entries replaced by [$]\cdots[$] or [$]\vdots[$] or [$]\ddots[$]?
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

February 10th, 2018, 1:46 pm

 what exactly do you want, a lot of the entries replaced by [$]\cdots[$] or [$]\vdots[$] or [$]\ddots[$]?
The prototypical example is the upper bidiagonal matrix here.
https://www.quantstart.com/articles/Tri ... -Algorithm
 
User avatar
ppauper
Posts: 69069
Joined: November 15th, 2001, 1:29 pm

Re: Inline math

February 10th, 2018, 3:41 pm

 what exactly do you want, a lot of the entries replaced by [$]\cdots[$] or [$]\vdots[$] or [$]\ddots[$]?
The prototypical example is the upper bidiagonal matrix here.
https://www.quantstart.com/articles/Tri ... -Algorithm
in firefox, when you right click on a picture, you can copy the URL
when I right click on the equation on that site, it gives me the tex
[$]\begin{bmatrix}  
1 & c^{*}_1 & 0 & 0 & ... & 0 \\
0 & 1 & c^{*}_2 & 0 & ... & 0 \\
0 & 0 & 1 & c^{*}_3 & 0 & 0 \\
. & . &  &  &  & . \\
. & . &  &  &  & . \\
. & . &  &  &  & c^{*}_{k-1} \\
0 & 0 & 0 & 0 & 0 & 1 \\
\end{bmatrix} \begin{bmatrix}  
f_1 \\
f_2 \\
f_3 \\
.\\
.\\
.\\
f_k \\
\end{bmatrix} = \begin{bmatrix}
d^{*}_1 \\
d^{*}_2 \\
d^{*}_3 \\
.\\
.\\
.\\
d^{*}_k \\
\end{bmatrix}
[$]
 
User avatar
Cuchulainn
Posts: 57041
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Inline math

February 11th, 2018, 12:23 pm

That works great. Thanks.
We added some icing by printing the ellipsis .. . along the diagonals.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On