```julia
using Symbolics
```


```julia
@variables t x y
```




\begin{equation}
\left[
\begin{array}{c}
t \\
x \\
y \\
\end{array}
\right]
\end{equation}





```julia
D = Differential(t)
```




    (::Differential) (generic function with 2 methods)




```julia
z = t + t^2
```




\begin{equation}
t + t^{2}
\end{equation}





```julia
D(z)
```




\begin{equation}
\mathrm{\frac{d}{d t}}\left( t + t^{2} \right)
\end{equation}





```julia
expand_derivatives(D(z))
```




\begin{equation}
1 + 2 t
\end{equation}





```julia
Symbolics.jacobian([x + x*y, x^2 + y], [x, y])
```




\begin{equation}
\left[
\begin{array}{cc}
1 + y & x \\
2 x & 1 \\
\end{array}
\right]
\end{equation}





```julia
B = simplify.([t^2 + t + t^2 2t + 4t; x + y + y + 2t x^2 - x^2 + y^2])
```




\begin{equation}
\left[
\begin{array}{cc}
t + 2 t^{2} & 6 t \\
x + 2 t + 2 y & y^{2} \\
\end{array}
\right]
\end{equation}





```julia
simplify.(substitute.(B, (Dict(x=>y^2),)))
```




\begin{equation}
\left[
\begin{array}{cc}
t + 2 t^{2} & 6 t \\
2 t + y^{2} + 2 y & y^{2} \\
\end{array}
\right]
\end{equation}





```julia
substitute.(B, (Dict(x => 2.0, y=>3.0, t=>4.0),))
```




\begin{equation}
\left[
\begin{array}{cc}
36.0 & 24.0 \\
16.0 & 9.0 \\
\end{array}
\right]
\end{equation}




# SymbolivUtils


```julia
import Pkg
Pkg.add("SymbolicUtils")
```

    [32m[1m    Updating[22m[39m registry at `~/.julia/registries/General`
    [32m[1m    Updating[22m[39m git-repo `https://github.com/JuliaRegistries/General.git`
    [32m[1m   Resolving[22m[39m package versions...
    [32m[1m   Installed[22m[39m SymbolicUtils ─ v0.18.2
    [32m[1m    Updating[22m[39m `~/.julia/environments/v1.7/Project.toml`
     [90m [d1185830] [39m[92m+ SymbolicUtils v0.18.2[39m
    [32m[1m    Updating[22m[39m `~/.julia/environments/v1.7/Manifest.toml`
     [90m [d1185830] [39m[93m↑ SymbolicUtils v0.18.1 ⇒ v0.18.2[39m
    [32m[1mPrecompiling[22m[39m project...
    [33m  ✓ [39mSymbolicUtils
    [33m  ✓ [39mSymbolics
      2 dependencies successfully precompiled in 30 seconds (192 already precompiled)
      [33m2[39m dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions



```julia
using SymbolicUtils
```


```julia
SymbolicUtils.show_simplified[] = true
```




    true




```julia
@syms x::Real y::Real z::Complex f(::Number)::Real
```




    (x, y, z, f)




```julia
2x^2 - y + x^2
```




\begin{equation}
 - y + 3 x^{2}
\end{equation}





```julia
f(sin(x)^2 + cos(x)^2) + z
```




\begin{equation}
z + f\left( \cos^{2}\left( x \right) + \sin^{2}\left( x \right) \right)
\end{equation}





```julia
r = @rule sinh(im * ~x) => sin(~x)
```




    sinh(im * ~x) => sin(~x)




```julia
r(sinh(im*y))
```




\begin{equation}
\sin\left( y \right)
\end{equation}





```julia
simplify(cos(y)^2 + sinh(im*y)
```

085d8134ddfa4ec7a6a9b1c57996723f4c022377
ipynb
Jupyter Notebook
all_repository/julia_lab/sym_test-Copy1.ipynb
jskDr/keraspp_2021
dc46ebb4f4dea48612135136c9837da7c246534a
MIT
2021-09-21T15:35:04.000Z
2021-12-14T12:14:44.000Z
all_repository/julia_lab/sym_test-Copy1.ipynb
jskDr/keraspp_2021
dc46ebb4f4dea48612135136c9837da7c246534a
MIT
all_repository/julia_lab/sym_test-Copy1.ipynb
jskDr/keraspp_2021
dc46ebb4f4dea48612135136c9837da7c246534a
MIT
Qwen/Qwen-72B
1. YES
2. YES