How to best design a calculus solver

I have loads of free time and nothing better to do so I wanted to write a program that could do simple calculus problems for me(derivation, integration, eventually u substitution, chain rule, l'hospital's rule, etc) but was having an issue on how to implement this. Right now I have it set up to accept an input in this format 2x^3 + 3x^2 + 4x + 5 and I'm using converting it to post-fix notation(however very poorly converting it seems to be broken also). The converted form of that equation ends up being 233245x^+x^+x+

I am currently using a Stack<Integer> and a Stack<Character> to store the values but I don't think this is the proper way to go about it.

Can anyone lead me in the right direction or lend some insight? If you're unfamiliar with calculus the equation I entered should end up being

6x^2 + 6x + 4 after finding the derivative and 12x + 6 after finding the second derivative.