Ask Your Question

Revision history [back]

numerical evaluation with variables

Hello,

a few days ago I started working with sage. So very soon I run into into questions. Here is one of them:

I defined an equation:

sage: x, y = var('x, y')

sage: eq = y == (sqrt(5) + 3) * x^3 + e^pi * x^2 + sqrt(2) * x + 1/27

And I want to get from that something like:

y == 5.236 * x^3 + 23.141 * x^2 + 1.414 * x + 0.037

the numerical_approx() seems to be designed for another purpose. How do I get my desired result?