Circuit to solve algebra problem?
Yes, you could do something like that. The 'answer' (second case) would only be present for an instant since the integration with respect to time would continue, and you'd have to have a way to reset the capacitor (initial condition) and grab that voltage after exactly x seconds. 

You could do it statically with log and antilog amplifiers (using the logarithmic property of transistors plus op-amps). 

\$\frac{x^2}{2}\$ = 0.5\$e^{2 log_e(x)}\$

Easier said (or written) than done, and has 'interesting' complications if x is negative, zero or even very small. 

Or use a multiplier chip (expensive). 

Even at MHz you can do this digitally, so that tends to be the way people roll these days.