lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, May 8, 2009 at 12:01 AM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
> I've had a quick look at your code, but I can't work this one out:  what's
> the result of differentiating 3*x^2 + 5*x^2?  That is, does it gather terms
> that aren't exactly alike?

Yes, Houston, we do have a problem:

+ 	3 * 2 * x + 5 * 2 * x   (unfolded result)
- 	6 * x + 10 * x       (folded result)

Obviously it's missing an opportunity for simplification, but I don't
know how to express it generally yet.

And collaboration would be most cool.

steve d.