setup for *possible* CI rendering

This commit is contained in:
jverzani
2022-09-10 13:39:23 -04:00
parent decef62bbb
commit 2739cda456
5 changed files with 52 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ This section uses these add-on packages:
```{julia}
using CalculusWithJulia
using Plots
using ImplicitPlots
using Roots
using SymPy
```
@@ -45,10 +44,10 @@ The **graph** of an equation is just the set of solutions to the equation repres
With this definition, the graph of a function $f(x)$ is just the graph of the equation $y = f(x)$. In general, graphing an equation is more complicated than graphing a function. For a function, we know for a given value of $x$ what the corresponding value of $f(x)$ is through evaluation of the function. For equations, we may have $0$, $1$ or more $y$ values for a given $x$ and even more problematic is we may have no rule to find these values.
There are a few options for plotting equations in `Julia`. We will use `ImplicitPlots` in this section, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
There are a few options for plotting equations in `Julia`. We will use a function from the `ImplicitPlots` package that is in the `CalculusWithJulia` package in this section, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
To plot an implicit equation using `ImplicitPlots` requires expressing the relationship in terms of a function, and then plotting the equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
To plot an implicit equation using `implicit_plot` requires expressing the relationship in terms of a function, and then plotting the equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
To plot the circle of radius $2$, or the equations $x^2 + y^2 = 2^2$ we would move all terms to one side $x^2 + y^2 - 2^2 = 0$ and then express the left hand side through a function:
@@ -397,7 +396,7 @@ The use of `lambdify(H)` is needed to turn the symbolic expression, `H`, into a
:::{.callout-note}
## Note
While `SymPy` itself has the `plot_implicit` function for plotting implicit equations, this works only with `PyPlot`, not `Plots`, so we use the `ImplicitPlots` package in these examples.
While `SymPy` itself has the `plot_implicit` function for plotting implicit equations, this works only with `PyPlot`, not `Plots`, so we use the `implicit_plot` function from the `ImplicitPlots` package in these examples.
:::
@@ -1081,4 +1080,3 @@ A plot can be made of either the boundary, the interior, or both.
#| eval: false
plot(region.inner) # plot interior; use r.boundary for boundary
```

View File

@@ -17,7 +17,6 @@ using Roots
#| echo: false
#| results: "hidden"
using CalculusWithJulia.WeaveSupport
using ImplicitPlots
fig_size = (800, 600)
const frontmatter = (
@@ -1557,5 +1556,3 @@ yesnoq(false)
```
All methods work quickly with this well-behaved problem. In general the convergence rates are slightly different for each, with the Steffensen method matching Newton's method and the difference quotient method being slower in general. All can be more sensitive to the initial guess.