It would be greate to write a module to encapsulate maxima, which is the old DOE MACSYMA. See the most excellent Maxima home page. It is a great program and runs on many platforms. It is maintained by William F. Schelter, and has source code, a nice install for windows, and rpms for linux. I have had success with all of these.

Your sample equation is nifty since the solution is a complex number. Maxima program:

solve([2*x*(-5*10*x)=100],[x])
yields:
[x = - %I, x = %I]
Where %I is maxima's notation for sqrt(-1) .

Maxima is massive overkill for your requirements, since it can also solve nasty problems such as the indefinite integral:

integrate(sin(x)*exp(x^2),x);
or a relatively difficult problem in two variables:
solve([2*x^2+14*y+y^2=5,x*y+14*x+x^2=0],[x,y])

Even though it is overkill, it is a good open-source problem-solver for easy algebra problems.

I have used Maxima for many real-world problems and also for teaching algebra. It is much better at algebra than I am, so I use it because I don't have the answer key for my textbook!

It should work perfectly the first time! - toma


In reply to Re: Solving Math Equations by toma
in thread Solving Math Equations by dopey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.