• 358,601

# 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).

## 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

\documentclass[openany]{memoir}
\usepackage[svgnames]{xcolor}

\begin{document}

\color{AliceBlue}{AliceBlue}
\color{AntiqueWhite}{AntiqueWhite}
\color{Aqua}{Aqua}
\color{Aquamarine}{Aquamarine}
\color{Azure}{Azure}
\color{Beige}{Beige}
\color{Bisque}{Bisque}
\color{Black}{Black}
\color{BlanchedAlmond}{BlanchedAlmond}
\color{Blue}{Blue}
\color{BlueViolet}{BlueViolet}
\color{Brown}{Brown}
\color{BurlyWood}{BurlyWood}
\color{Chartreuse}{Chartreuse}
\color{Chocolate}{Chocolate}
\color{Coral}{Coral}
\color{CornflowerBlue}{CornflowerBlue}
\color{Cornsilk}{Cornsilk}
\color{Crimson}{Crimson}
\color{Cyan}{Cyan}
\color{DarkBlue}{DarkBlue}
\color{DarkCyan}{DarkCyan}
\color{DarkGoldenrod}{DarkGoldenrod}
\color{DarkGray}{DarkGray}
\color{DarkGreen}{DarkGreen}
\color{DarkGrey}{DarkGrey}
\color{DarkKhaki}{DarkKhaki}
\color{DarkMagenta}{DarkMagenta}
\color{DarkOliveGreen}{DarkOliveGreen}
\color{DarkOrange}{DarkOrange}
\color{DarkOrchid}{DarkOrchid}
\color{DarkRed}{DarkRed}
\color{DarkSalmon}{DarkSalmon}
\color{DarkSeaGreen}{DarkSeaGreen}
\color{DarkSlateBlue}{DarkSlateBlue}
\color{DarkSlateGray}{DarkSlateGray}
\color{DarkSlateGrey}{DarkSlateGrey}
\color{DarkTurquoise}{DarkTurquoise}
\color{DarkViolet}{DarkViolet}
\color{DeepPink}{DeepPink}
\color{DeepSkyBlue}{DeepSkyBlue}
\color{DimGray}{DimGray}
\color{DimGrey}{DimGrey}
\color{DodgerBlue}{DodgerBlue}
\color{FireBrick}{FireBrick}
\color{FloralWhite}{FloralWhite}
\color{ForestGreen}{ForestGreen}
\color{Fuchsia}{Fuchsia}
\color{Gainsboro}{Gainsboro}
\color{GhostWhite}{GhostWhite}
\color{Gold}{Gold}
\color{Goldenrod}{Goldenrod}
\color{Gray}{Gray}
\color{Green}{Green}
\color{GreenYellow}{GreenYellow}
\color{Grey}{Grey}
\color{Honeydew}{Honeydew}
\color{HotPink}{HotPink}
\color{IndianRed}{IndianRed}
\color{Indigo}{Indigo}
\color{Ivory}{Ivory}
\color{Khaki}{Khaki}
\color{Lavender}{Lavender}
\color{LavenderBlush}{LavenderBlush}
\color{LawnGreen}{LawnGreen}
\color{LemonChiffon}{LemonChiffon}
\color{LightBlue}{LightBlue}
\color{LightCoral}{LightCoral}
\color{LightCyan}{LightCyan}
\color{LightGoldenrod}{LightGoldenrod}
\color{LightGoldenrodYellow}{LightGoldenrodYellow}
\color{LightGray}{LightGray}
\color{LightGreen}{LightGreen}
\color{LightGrey}{LightGrey}
\color{LightPink}{LightPink}
\color{LightSalmon}{LightSalmon}
\color{LightSeaGreen}{LightSeaGreen}
\color{LightSkyBlue}{LightSkyBlue}
\color{LightSlateBlue}{LightSlateBlue}
\color{LightSlateGray}{LightSlateGray}
\color{LightSlateGrey}{LightSlateGrey}
\color{LightSteelBlue}{LightSteelBlue}
\color{LightYellow}{LightYellow}
\color{Lime}{Lime}
\color{LimeGreen}{LimeGreen}
\color{Linen}{Linen}
\color{Magenta}{Magenta}
\color{Maroon}{Maroon}
\color{MediumAquamarine}{MediumAquamarine}
\color{MediumBlue}{MediumBlue}
\color{MediumOrchid}{MediumOrchid}
\color{MediumPurple}{MediumPurple}
\color{MediumSeaGreen}{MediumSeaGreen}
\color{MediumSlateBlue}{MediumSlateBlue}
\color{MediumSpringGreen}{MediumSpringGreen}
\color{MediumTurquoise}{MediumTurquoise}
\color{MediumVioletRed}{MediumVioletRed}
\color{MidnightBlue}{MidnightBlue}
\color{MintCream}{MintCream}
\color{MistyRose}{MistyRose}
\color{Moccasin}{Moccasin}
\color{NavajoWhite}{NavajoWhite}
\color{Navy}{Navy}
\color{NavyBlue}{NavyBlue}
\color{OldLace}{OldLace}
\color{Olive}{Olive}
\color{OliveDrab}{OliveDrab}
\color{Orange}{Orange}
\color{OrangeRed}{OrangeRed}
\color{Orchid}{Orchid}
\color{PaleGoldenrod}{PaleGoldenrod}
\color{PaleGreen}{PaleGreen}
\color{PaleTurquoise}{PaleTurquoise}
\color{PaleVioletRed}{PaleVioletRed}
\color{PapayaWhip}{PapayaWhip}
\color{PeachPuff}{PeachPuff}
\color{Peru}{Peru}
\color{Pink}{Pink}
\color{Plum}{Plum}
\color{PowderBlue}{PowderBlue}
\color{Purple}{Purple}
\color{Red}{Red}
\color{RosyBrown}{RosyBrown}
\color{RoyalBlue}{RoyalBlue}
\color{Salmon}{Salmon}
\color{SandyBrown}{SandyBrown}
\color{SeaGreen}{SeaGreen}
\color{Seashell}{Seashell}
\color{Sienna}{Sienna}
\color{Silver}{Silver}
\color{SkyBlue}{SkyBlue}
\color{SlateBlue}{SlateBlue}
\color{SlateGray}{SlateGray}
\color{SlateGrey}{SlateGrey}
\color{Snow}{Snow}
\color{SpringGreen}{SpringGreen}
\color{SteelBlue}{SteelBlue}
\color{Tan}{Tan}
\color{Teal}{Teal}
\color{Thistle}{Thistle}
\color{Tomato}{Tomato}
\color{Turquoise}{Turquoise}
\color{Violet}{Violet}
\color{VioletRed}{VioletRed}
\color{Wheat}{Wheat}
\color{White}{White}
\color{WhiteSmoke}{WhiteSmoke}
\color{Yellow}{Yellow}
\color{YellowGreen}{YellowGreen}

\end{document}


This produces the following

xcolor svgnames

## 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.

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:

\begin{itemize}
\item Stripping out the text boxes.
\item Latex generation for math output in inline text sections was uniformly poor.
\end{itemize}

# Guts.

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$.

## 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:

http://behindtheguesses.blogspot.com/

but this appears to be a very labour intensive exercise. There is no natural support for latex in blogspot.com. 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 »