jfbercher / jupyter_latex_envs

(Some) LaTeX environments for Jupyter
Other
112 stars 28 forks source link

Broken Equations #61

Open steve-cox-LA opened 3 years ago

steve-cox-LA commented 3 years ago

This is a beautiful package - it has enabled so much - but occasionally within groups of equations it ignores the latex setting, of one or more equations, entirely or in pieces. In the example below, when enabling latex_envs the equation labeled broken is rendered in broken pieces. I have reproduced this on two windows machines, running 7 and 10, on jupyter notebooks opened with anaconda3.


This free body diagram, Figure 2, allows us to balance the spring (restoring) forces, $y_j$, with the applied forces, $f_j=\rho dz g$, at each mass;

$$ y_0 = f_0 + y_1, \hskip 0.25in y_1 = f_1 + y_2, and y_2=f_2, \nonumber $$

or, in matrix terms

$$ By = f where f = \begin{bmatrix}f_0 \cr f_1 \cr f_2\end{bmatrix} and B = \begin{bmatrix}1 & -1 & 0 \cr 0 & 1 & -1 \cr 0 & 0 & 1 \end{bmatrix} \nonumber $$

As is the previous section we recognize in $B$ the transpose of $A$. Gathering our three important steps

$$ \eqalign{e &= Ax \cr y &= Ke \cr A^Ty &= f \cr} \label{eq:strq1} $$

we arrive, via direct substitution, at an equation for $x$. Namely

$$ A^Ty=f \Rightarrow A^TKe = f \Rightarrow \boxed{A^TKAx = f.} \label{eq:strq2} $$

These four steps, (\ref{eq:strq1})-(\ref{eq:strq2}), comprise the Strang Quartet for mechanical networks. Assembling $A^TKA$ we arrive at the final system

$$ \begin{bmatrix}k_0+k_1 & -k_1 & 0 \cr -k_1 & k_1+k_2 & -k_2 \cr 0 & -k_2 & k_2 \end{bmatrix} \begin{bmatrix}x_0 \cr x_1 \cr x_2\end{bmatrix} = \begin{bmatrix}f_0 \cr f_1 \cr f_2\end{bmatrix}, \label{eq:g3} $$