Lua Computer Algebra System

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Lua Computer Algebra System

Post by xXxMoNkEyMaNxXx »

Yes! Lua, do my calculus homework!

Code: Select all

require'cas'

local example=cas.parse'5 x^2+3*x-1'
print(example:derive'x')
print(example{x=5})
print(example:derive'x'{x=5})

print(cas.parse'5ysin(x^x+y/(9x-6))+12':derive'x'{x=3,y=4}) --and later, :solve'y`'
Output:
> ((5*x^(2+-1)*2)+3)
> 139
> 53
> ((5*y`*0.88376947941016)+(-9.3584508817024*(56.662531794039+(y`*0.047619047619048)+-0.081632653061224)))
cas.lua
Changed emath to cas and added :expand()
(12.46 KiB) Downloaded 290 times
adondriel
Prole
Posts: 1
Joined: Tue Oct 07, 2014 2:00 am

Re: Lua Computer Algebra System

Post by adondriel »

Could you add a factor function? To go from expanded form to nonexpanded form?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests