# Differential equation Symbolics.jl output using Latexify.jl

**URL:** https://discourse.julialang.org/t/differential-equation-symbolics-jl-output-using-latexify-jl/125309
**Category:** New to Julia
**Tags:** question, latex, symbolics
**Created:** [January 28, 2025, 4:14pm UTC](https://discourse.julialang.org/t/differential-equation-symbolics-jl-output-using-latexify-jl/125309 "2025-01-28T16:14:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jpg1](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jpg1](https://discourse.julialang.org/u/jpg1)
#### Post date: [January 28, 2025, 4:14pm UTC](https://discourse.julialang.org/t/differential-equation-symbolics-jl-output-using-latexify-jl/125309/1 "2025-01-28T16:14:20Z")

</div>

Hi! Enjoying using Julia greatly so far. I’ve been learning to use Symbolics.jl for differential equations, and rendering the output with Latexify.jl.

However, I was wondering if it was possible to get the latexify output to read more like standard Leibniz notation… To illustrate:

```julia
using Symbolics, Latexify

@variables x y
Dx = Differential(x)
Dxxx = Differential(x)^3

eq = Dxxx(y) + Dx(y)

latexify(eq)

```

This creates the output:

\begin{equation} \frac{\mathrm{d}}{\mathrm{d}x} y + \frac{\mathrm{d}}{\mathrm{d}x} \frac{\mathrm{d}}{\mathrm{d}x}\frac{\mathrm{d}}{\mathrm{d}x} y \end{equation}

Whereas, I’d prefer to have the output read something like:

\begin{equation} \frac{\mathrm{d}y}{\mathrm{d}x} + \frac{\mathrm{d}^3y}{\mathrm{d}x^3} \end{equation}

I’m still new to this so I’ve probably misunderstood something! I’m assuming it’s just due to the way symbols work… but is there a way to automatically tidy up this kind of math output?

Thank you!

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [January 29, 2025, 10:04am UTC](https://discourse.julialang.org/t/differential-equation-symbolics-jl-output-using-latexify-jl/125309/2 "2025-01-29T10:04:13Z")

</div>

> [@jpg1](#):
>
> I’m still new to this so I’ve probably misunderstood something! I’m assuming it’s just due to the way symbols work… but is there a way to automatically tidy up this kind of math output?

You’re doing the symbolic side right. We just haven’t set that up in the symbolic latex generation yet. Someone would need to make this function smarter:

> <https://github.com/JuliaSymbolics/Symbolics.jl/blob/v6.25.0/src/latexify_recipes.jl>
