Peeter Joot's (OLD) Blog.

Math, physics, perl, and programming obscurity.

Posts Tagged ‘latex’

updated compilation of class notes for phy454h1s, continuum mechanics.

Posted by peeterjoot on May 28, 2012

As mentioned previously I’ve got a compilation of class notes here:

This has been updated now with many changes that should make it easier to read. These notes are no longer follow the exact order of the lectures, but are grouped by topic, with the various problems incorporated into the chapter content as Problems/Solutions sections. Some stuff is moved to appendixes, and some parts just plain deleted. There are a number of cosmetic changes too, the biggest of which is style overhaul resulting from a switch to the book class to the classicthesis style (not strictly for thesis content since it provides an elegant general book template and framework).

Posted in Math and Physics Learning. | Tagged: , , , , , | Leave a Comment »

latex colors

Posted by peeterjoot on May 16, 2012

I’d seen in wikipedia a list of colors for latex, but some of them didn’t work for me. Looking in the .log file from my latex compilation, I found the path to the color definitions in effect for my document and ran a bit of search and replace to create the following





This produces the following

xcolor svgnames

Posted in Math and Physics Learning. | Tagged: , | Leave a Comment »

Potential for an infinitesimal width infinite plane. Take III

Posted by peeterjoot on February 24, 2012

[Click here for a PDF of this post with nicer formatting and figures if the post had any (especially if my latex to wordpress script has left FORMULA DOES NOT PARSE errors.)]

Document generation experiment.

This little document was generated as an experiment using Mathematica and some post processing in latex.

The File menu save as latex produced latex that couldn’t be compiled, but mouse selected, copy-as latex worked out fairly well.

Post processing done included:

\item Adding in latex prologue.
\item Stripping out the text boxes.
\item Adding in equation environments.
\item Latex generation for math output in inline text sections was uniformly poor.


I’d like to attempt again to evaluate the potential for infinite plane distribution. The general form of our potential takes the form

\begin{aligned}\phi(\mathbf{x}) = G \rho \int \frac{1}{{{\left\lvert{\mathbf{x} - \mathbf{x}'}\right\rvert}}} dV'\end{aligned} \hspace{\stretch{1}}(2.1)

We want to evaluate this with cylindrical coordinates (r', \theta', z'), for a width \epsilon, and radius r, at distance z from the plane.

\begin{aligned}\phi (z, \epsilon , r)= 2 \pi  G \sigma  \frac{1}{\epsilon }\int _{r' = 0}^r\int _{z' = 0}^{\epsilon }\frac{r'}{\sqrt{\left(z-z'\right)^2+\left(r'\right)^2}}dz'dr'\end{aligned} \hspace{\stretch{1}}(2.2)

With the assumption that we will take the limits \epsilon \rightarrow 0, and r \rightarrow \infty. With r^2 = c/\epsilon, this does not converge. How about with r = c/\epsilon?

Performing the r’ integration (with r^2 = c/\epsilon) we find

\begin{aligned}\phi (z, \epsilon )= 2 \pi  G \sigma  \frac{1}{\epsilon }\int_{z' = 0}^{\epsilon } \left(\sqrt{\frac{c^2}{\epsilon ^2}+(z-z')^2}-\sqrt{(z-z')^2}\right) \, dz'\end{aligned} \hspace{\stretch{1}}(2.3)

Attempting to let \textit{Mathematica} evaluate this takes a long time. Long enough that I aborted the attempt to evaluate it.

Instead, first evaluating the z’ integral we have

\begin{aligned}\phi (z, \epsilon , r)=\frac{2 \pi  G \sigma }{\epsilon }\int _{r' = 0}^{c/\epsilon }\left(\log \left(\sqrt{\left(r'\right)^2+z^2}+z\right)-\log \left(\sqrt{\left(r'\right)^2+(z-\epsilon )^2}+z-\epsilon \right)\right)dr'\end{aligned} \hspace{\stretch{1}}(2.4)

This second integral can then be evaluated in reasonable time:

\begin{aligned}\begin{aligned}\phi (z, \epsilon )&= \frac{2 \pi  G \sigma }{\epsilon ^2} \left(c \log \left(\frac{\sqrt{\frac{c^2}{\epsilon ^2}+z^2}+z}{\sqrt{\frac{c^2}{\epsilon ^2}+(z-\epsilon )^2}+z-\epsilon }\right)+\epsilon  \left(z \log \left(\frac{(z-\epsilon ) \left(\sqrt{c^2+z^2 \epsilon ^2}+c\right)}{z}\right)+(\epsilon -z) \log \left(\sqrt{c^2+\epsilon ^2 (z-\epsilon )^2}+c\right)-\epsilon  \log (\epsilon  (z-\epsilon ))\right)\right) \\ &=2 \pi  G \sigma  \left(\frac{c}{\epsilon ^2}\log \left(\frac{\sqrt{c^2+z^2 \epsilon ^2}+z \epsilon }{\sqrt{c^2+\epsilon ^2(z-\epsilon )^2}+\epsilon (z-\epsilon )}\right)+\frac{z}{\epsilon } \log \left(\frac{(z-\epsilon ) \left(\sqrt{c^2+z^2 \epsilon ^2}+c\right)}{z\left(\sqrt{c^2+\epsilon ^2 (z-\epsilon )^2}+c\right)}\right)+ \log \left(\frac{\sqrt{c^2+\epsilon ^2 (z-\epsilon )^2}+c}{\epsilon  (z-\epsilon )}\right)\right)\end{aligned}\end{aligned} \hspace{\stretch{1}}(2.5)

Does this have a limit as \epsilon \rightarrow 0? No, the last term is clearly divergent for c \neq 0.

Posted in Math and Physics Learning. | Tagged: , , , , | Leave a Comment »

math blogging without align*/align/&= ?

Posted by peeterjoot on July 4, 2009

As I learn things I keep posting my notes in little latex generated .pdfs on my website Peeter Joot’s math and physics play. This is a very blog like activity, and it would be natural to actually do this in a blog.

Eli does a nice job of something like this with his blog:

but this appears to be a very labour intensive exercise. There is no natural support for latex in wordpress on the other hand has some reasonable latex support, but I’ll be damned if I can get multiline equations to work in wordpress. I’m curious how anybody else can live with this restriction. If it weren’t for that, scripting the conversion of a latex file to blog content wouldn’t be too hard. I cooked up something that almost does the job (a small perl script) but lack of multiline support defeats this.

EDIT: turns out that while the alignment marks like &= don’t work, \\ does, so you can still do multiline stuff in wordpress … it just doesn’t look as good as in standalone latex.

Posted in Incoherent ramblings | Tagged: , | 4 Comments »