Demo of embedded symbolic math
Hans Petter Langtangen [1, 2]
[1] Simula
[2] University of Oslo
May 14, 2015
The following text was generated from a
DocOnce file
where all mathematical computations are done in the background
by SymPy.
$$
\begin{align*}
\iint a x + y^{2} \sin{\left (y \right )}\, dx\, dy &= \int \frac{a x^{2}}{2} + x y^{2} \sin{\left (y \right )}\, dy\\
&= \frac{a y}{2} x^{2} + x \left(- y^{2} \cos{\left (y \right )} + 2 y \sin{\left (y \right )} + 2 \cos{\left (y \right )}\right)
\end{align*}
$$
The solution of \( a x^{2} + b x + c = 0 \) is
$$ x = \left [ \frac{1}{2 a} \left(- b + \sqrt{- 4 a c + b^{2}}\right), \quad - \frac{1}{2 a} \left(b + \sqrt{- 4 a c + b^{2}}\right)\right ] $$