I discovered the following, trying to write a check to establish if a student's answer for a series question is a p-series. [As a side note, if anyone has a suggestion for a better way to accomplish this, I'd love to hear it.] Here is a minimal code snippet example of the issue.
$shouldbeminusone = ($myf/$mydf)/Formula("n");
$shouldbezero= $shouldbeminusone ->D('n');
This outputs three lines:
The top line is the correct derivative of 1/n. The second line should be displaying 1/n/[(-1)/(n^2)]/n but the minus sign is missing. This is issue #1.
Regardless of whether the second line reduces to 1 or -1, the bottom line is defined as its derivative, and should simplify to 0. But it simplifies to -2/n. (Try copying and pasting it into WolframAlpha to see this. In any case, in PG it is being counted as equal to Formula("0").)
This is issue #2.
And so my check that this equals Formula("0") (as a way to check whether the original thing was a p-series) fails. Something about D is not working here. Or I am not using D correctly.
Bug(s) (or user error?) with D derivative method
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 5 posting(s) in 1 day