Curve plotting and equation solving