Skip to content

Commit cef96f2

Browse files
committed
cleaner Symbolics output
1 parent 8a53509 commit cef96f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lectures/tools_and_techniques/geom_series.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,21 +786,24 @@ After that, we'll use `Symbolics.jl` to compute derivatives
786786
G = (1 + g)
787787
R = (1 + r)
788788
p0 = x0 / (1 - G * R ^ (-1))
789-
print("Our formula is: $p0")
789+
print("Our formula is")
790+
p0
790791
```
791792

792793
```{code-cell} julia
793794
# Partial derivative with respect to g
794795
dg = Differential(g)
795796
dp_dg = expand_derivatives(dg(p0))
796-
print("dp0 / dg is: $dp_dg")
797+
print("dp0 / dg is")
798+
dp_dg
797799
```
798800

799801
```{code-cell} julia
800802
# Partial derivative with respect to r
801803
dr = Differential(r)
802804
dp_dr = expand_derivatives(dr(p0))
803-
print("dp0 / dr is: $dp_dr")
805+
print("dp0 / dr is")
806+
dp_dr
804807
```
805808

806809
We can see that for $\frac{\partial p_0}{\partial r}<0$ as long as

0 commit comments

Comments
 (0)