many edits
This commit is contained in:
@@ -501,10 +501,11 @@ d, r = polynomial_coeffs(ex, (x,))
|
||||
r
|
||||
```
|
||||
|
||||
To find the degree of a monomial expression, the `degree` function is available. Here it is applied to each monomial in `d`:
|
||||
To find the degree of a monomial expression, the `degree` function is available, though not exported. Here it is applied to each monomial in `d`:
|
||||
|
||||
|
||||
```{julia}
|
||||
import Symbolics: degree
|
||||
[degree(k) for (k,v) ∈ d]
|
||||
```
|
||||
|
||||
@@ -773,6 +774,11 @@ Symbolics.jacobian(eqs, [x,y])
|
||||
|
||||
### Integration
|
||||
|
||||
::: {.callout-note}
|
||||
#### This area is very much WIP
|
||||
|
||||
The use of `SymbolicNumericIntegration` below is currently broken.
|
||||
:::
|
||||
|
||||
The `SymbolicNumericIntegration` package provides a means to integrate *univariate* expressions through its `integrate` function.
|
||||
|
||||
@@ -904,18 +910,27 @@ v = factor_rational(u)
|
||||
|
||||
As such, the integrals have numeric differences from their mathematical counterparts:
|
||||
|
||||
::: {.callout-note}
|
||||
#### Errors ahead
|
||||
|
||||
These last commands are note being executed, as there are errors.
|
||||
:::
|
||||
|
||||
|
||||
```{julia}
|
||||
a,b,c = integrate(u)
|
||||
#| eval: false
|
||||
a,b,c = integrate(u) # not
|
||||
```
|
||||
|
||||
We can see a bit of how much through the following, which needs a tolerance set to identify the rational numbers of the mathematical factorization correctly:
|
||||
|
||||
|
||||
```{julia}
|
||||
#| eval: false
|
||||
cs = [first(arguments(term)) for term ∈ arguments(a)] # pick off coefficients
|
||||
```
|
||||
|
||||
```{julia}
|
||||
rationalize.(cs; tol=1e-8)
|
||||
#| eval: false
|
||||
rationalize.(cs[2:end]; tol=1e-8)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user