Results 1 to 8 of 8

Thread: Solving Index Laws (Algebra) using .Net

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Question Solving Index Laws (Algebra) using .Net

    My co-employee (math professor) is asking my help to make a simple algebra solver for him. The specific topic is Index Laws, is there anything in .Net that I could already utilize for this or do I need to study the process of solving it and just code it manually? An example equation is like below and it looks simple but there will be other examples which are more difficult than this:

    (2x2)(3x + 2) = 6x3 + 4x2

    Any ideas on how I should tackle this problem is very much appreciated. I could probably use 2 richtextboxes for this but any other ideas are most welcome.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Index Laws (Algebra) using .Net

    Is the question to find all solutions to some polynomials? Or to symbolically factor polynomials? Or find roots of not-necessarily-polynomials?

    In any case, the Wolfram Alpha API should be able to solve all three, though you'd have to be alright with asking the internet to solve your problems. In general root finding is very difficult, but you might be able to get away with Newton's Method (which has come up on this forum repeatedly over the years). You might also be able to get ALGLIB to work for you. Apparently there's a project called "Math.NET" which purports to do some symbolic algebra, though I don't vouch for it in any way.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  3. #3

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Solving Index Laws (Algebra) using .Net

    At most, he said is to be able to solve multiplication and division of binomials. For now I am contemplating on using two richtextboxes and extract all data from both controls and try to multiply and divide as needed. For sure there has to be something like this that is already done but my google-fu cannot find them.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Index Laws (Algebra) using .Net

    I'm still not clear on the manipulations required.... Multiplying binomials is pretty trivial. Dividing them doesn't make a long of sense most of the time, though polynomial division is easy to implement (you just get a remainder term in general). It sounds much simpler than I was thinking originally--none of my three guesses seems to have been right, so I apparently have a hard time understanding you.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  5. #5

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Solving Index Laws (Algebra) using .Net

    Basically, what he wants if we input this:

    (2x2)(3x + 2)

    then when we click a button it should output this:

    6x3 + 4x2
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Index Laws (Algebra) using .Net

    Oh, ok. Strictly speaking the Wolfram Alpha solution would work, but it's wild overkill. The real issue is parsing the input, the math is trivial. You could always make it easy on yourself and just have them input (___x^2 + ___x + ___)(___x^2 + ___x + ___) where ___ is a textbox. The general form of this problem is solved in this StackOverflow thread, but that's also ridiculously overcomplicated for you.

    If it were me, I would require input to be of the form (...)(...)...(...) where (...) is of the form Ax^n + ... + Z (powers of x decreasing). You could parse that with very simple iteration, implement a basic polynomial class with only multiplication, and use it to expand things out.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  7. #7

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Solving Index Laws (Algebra) using .Net

    Is there any offline version of that Wolfram Alpha engine that I could utilize? I am mostly done with the multiplication of monomial to monomial and I think binomial to binomial should already be easier but I am afraid what I posted is just a simplistic example, there maybe more complex equations since we haven't yet talked much about this.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  8. #8
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Index Laws (Algebra) using .Net

    Not that I'm aware of; or at least, the user would need Mathematica installed, which is expensive (though most universities,at least in the US, seem to have licenses to give out for it).
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width