Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here an example:</p> <pre><code>&gt; library(Ryacas) &gt; s &lt;- Sym("s") &gt; nu &lt;- Sym("nu") &gt; theta &lt;- Sym("theta") &gt; e &lt;- exp((nu / (theta * (1 - nu))) * (1 - (1 + theta * s / nu)^(1 - nu))) &gt; de &lt;- deriv(e, s) &gt; de expression(-(exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * (theta * (1 - nu) * (nu * ((theta * s/nu + 1)^(1 - nu - 1) * ((1 - nu) * (nu * theta)))))/nu^2)/(theta * (1 - nu))^2) &gt; Simplify(de) expression(-(exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * (theta * s/nu + 1)^(1 - nu - 1))) </code></pre> <p>Note that we did get some simplification but the simplification was not perfect since the <code>1 - nu - 1</code> at the end could have been further simplified but was not.</p> <p>Here is an example of repeated derivatives (however, you will likely run into trouble if you really need to take this as high as 10):</p> <pre><code>&gt; de &lt;- e &gt; for(i in 1:3) print(de &lt;- Simplify(deriv(de, s))) expression(-(exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * (theta * s/nu + 1)^(1 - nu - 1))) expression((((theta * s/nu + 1)^(1 - nu - 1))^2 * exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * nu^2 + exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * theta * nu^2 * (theta * s/nu + 1)^(1 - nu - 1 - 1))/nu^2) expression((-3 * (nu * (theta * s/nu + 1)^(1 - nu - 1) * (theta * s/nu + 1)^(1 - nu - 1 - 1) * theta) - nu * ((theta * s/nu + 1)^(1 - nu - 1))^3 - nu * theta^2 * (theta * s/nu + 1)^(1 - nu - 1 - 1 - 1) - theta^2 * (theta * s/nu + 1)^(1 - nu - 1 - 1 - 1)) * exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu)))/nu) </code></pre> <p>Added:</p> <p>If the intermediate results are not needed one can do this to get the second derivative but again its unlikely it will handle a 10th derivative:</p> <pre><code>&gt; Simplify(deriv(e, s, 2)) expression(exp((1 - (theta * s/nu + 1)^(1 - nu)) * nu/(theta * (1 - nu))) * (theta * (theta * s/nu + 1)^(1 - nu - 1 - 1) + ((theta * s/nu + 1)^(1 - nu - 1))^2)) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload