newRPL - build 1255 released! [updated to 1299]
12-17-2018, 05:46 PM
Post: #324
 Claudio L. Senior Member Posts: 1,840 Joined: Dec 2013
RE: newRPL - build 1089 released! [update:build 1127]
(12-17-2018 05:13 PM)The Shadow Wrote:  Very nice! I suppose if you wanted to expand DER to handle SIN and COS, you'd have to use RULEAPPLY1, right? Otherwise you'd get an infinite loop.

Also, to implement the chain rule on that version of DER, you'd need separate rules applying it to SIN of a function, COS of a function, and a function to a power, correct?

What rules does AUTOSIMPLIFY apply?

You don't need to worry about infinite recursion, the rule would be:
Code:
 'DER(SIN(.xU),.xDU):→COS(.xU)*DER(.xU,.xDU)'

Since the COS is not inside DER(...) anymore, there's no issue with recursion. You do need independent rules for SIN, COS, and many others (this was just a humble example of what's possible, wasn't meant to be a proper derivative implementation).
By including generic functions '.xU' in the rules, rather than individual variables, the chain rule is already implemented. The next pass of RULESAPPLY will operate on the new DER(...) term until you end up with DER(constant,x)=0 or DER(x,x)=1.
This simplified example is lacking some important things, for example I did not include a generic multiplication rule:
Code:
 'DER(.xU*.XV,.xDW) = DER(.xU,.xDW)*.XV + .xU * DER(.XV,.xDW)'

in case the polynomial is factored, for example. This will take the first multiplicand ('.xU' would match one term in a multiplication, whatever subexpression it may contain) and isolate it from the rest of the expression ('.XV' will match all other multiplicands grouped together), and work its way recursively until all multiplicands have been separated.
 « Next Oldest | Next Newest »