Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
playground:playground [2021/09/27 13:26] jojo1973 |
playground:playground [2021/10/01 09:08] jojo1973 removed |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Numerical integration ==== | + | ===== Numerical integration |
- | Numeric integration of symbolic expressions is implemented | + | Numeric integration of symbolic expressions is performed |
'' | '' | ||
Line 17: | Line 17: | ||
For example valid expressions are: | For example valid expressions are: | ||
+ | |||
< | < | ||
- | F(X)=X*LN(X) | + | 'F(X)=X*LN(X)' |
- | G(Z)=Z^2-2*COS(Z) | + | 'G(Z)=Z^2-2*COS(Z)' |
- | VEL(T)=ACC*T | + | 'VEL(T)=ACC*T' |
</ | </ | ||
+ | |||
As shown above, the functions may refer to global or local variables; the function' | As shown above, the functions may refer to global or local variables; the function' | ||
Line 37: | Line 39: | ||
---- | ---- | ||
- | === Examples | + | ==== Angles and trigonometric expressions ==== |
- | The following | + | When a real number is input to a trigonometric function **newRPL** assumes that it is an angle expressed in the current angular mode; however the trigonometric functions are meant to process quantities expressed in radians. In other words the following |
+ | |||
+ | * in '' | ||
+ | * in '' | ||
+ | * in '' | ||
+ | |||
+ | where $θ_{r}\,$, $θ_{°}$ and $θ_{g}$ are the quantities entered by the user and $θ$ is what is actually fed to the trigonometric functions. | ||
+ | |||
+ | From this, two important consequences derive: | ||
+ | |||
+ | - the antiderivative changes according to the angular mode. Let's consider e.g. the function $ f(θ)=\sin{θ} $ and apply the transformations above:\\ \\ | ||
+ | * in '' | ||
+ | * in '' | ||
+ | * in '' | ||
+ | - no inverse transformation is applied to the resulting output: this is mathematically correct, but can be disconcerting if one is not immediately aware of the implicit variable substitution. | ||
+ | \\ | ||
+ | In conclusion, unless the user knows exactly what he/she is doing it's advisable **to perform numeric integration of trigonometric expressions in '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Example 1: Bound function on closed interval ==== | ||
+ | |||
+ | | pic | $$ \int^{2}_{0} x^{10}e^{\left(4x^{3}-3x^{4}\right)} \,dx $$ | **Input: | ||
+ | ' | ||
+ | 0 | ||
+ | 2 | ||
+ | tol | ||
+ | NUMINT</ | ||
+ | | ::: | tol=10< | ||
+ | | ::: | tol=10< | ||
+ | | ::: | tol=10< | ||
+ | | ::: | Exact at the precision shown | **[[https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Example 2: XXX ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Example 3: XXX ==== | ||
+ | |||
+ | ---- | ||
- | ^ Function | + | ==== Example |
- | ^ ^ '' | + | |
- | | $ \int^{5/ | + | |
- | | $ \int^{2}_{0} e^{-2x}\left(14x-11x^{2}\right) \,dx $ | 1.084 2 | 1.084 260 41 | 1.084 260 409 719 | $ \frac{3}{4}+\frac{73}{4e^{4}} $ | 1.084 260 409 719 3... | | + | |
- | | $ \int^{2}_{0} x^{10}e^{\left(4x^{3}-3x^{4}\right)} \,dx $ | 7.258 4 | 7.258 395 17 | 7.258 395 170 615 | No analytic solution exists | + | |
- | |{{: |