Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

understanding complex numbers from solve()

I'm reproducing whats in my math book, or I am trying to. There's a relatively simply equation that I'm supposed to solve, at 8.5 and get 12,14013462. However, when I do this in Sage I get a whole string of complex numbers. I've figured out how to reduce this glory of symbols of numbers into whats in my book, but I feel I am committing some form of atrocity, but maybe my book is simply off? Please let me know if this is not the place for questions like this.

I have this function and _solution_

f(x) = 10.28/(1+3.177*e^(-0.224*x))
fs = solve(f(x)==8.5, x)
show(fs)

However, here is what I get and it's not 12,14 (below is the code I use to cut down the glorious complexity to something that resembles what is in my book), the atrocity

fs1 = fs[0]  # they seem identical so I take the first item 
fs2 = numerical_approx(fs1.rhs())
fs3 = fs2[0] # simply shaving off the complex number
show(fs3)
type(fs3)