Post Reply 
newRPL - build 1255 released! [updated to 1299]
12-17-2018, 05:46 PM
Post: #324
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
newRPL - brickviking - 10-05-2018, 06:01 AM
RE: newRPL - build 1089 released! [update:build 1127] - Claudio L. - 12-17-2018 05:46 PM
How to participate? - erazor - 12-13-2019, 07:12 AM



User(s) browsing this thread: 2 Guest(s)