Can you solve it manually?
Sent from Mail for Windows 10

From: Stuart Reynolds
Sent: 08 March 2019 22:55
To: sympy
Subject: [sympy] Can sympy solve (1. - (x ** n)) ** (1/n) = y , and similar?

Dear Sympy users,

I'm new to sympy and interested in using it for function design.
I'm curious about what types of things I should be able to expected sympy.solve 
to solve. In particular, trying to solve:
(1. - (x ** 2)) ** (1. / 2) = 1/2
seems to fail for me: 


import sympy
x, one, two = sympy.symbols("x 1 2")

# Equation of circle: y=sqrt(1 - x^2)
# What x is gives 1/2?
f = (one - (x ** two)) ** (one / two)

# Asking sympy to find the analytics solution:
print sympy.solveset(sympy.Eq(f, one/two), x, domain=sympy.Reals)
# ValueError: x**w where w is irrational is not defined for negative x



This equation as a solution:
print sympy.lambdify([], f.subs({x:0.865}))() # 0.501 --- seems pretty close


Did I ask it wrong or is it a limitation of the solver?

Thanks,
- Stuart
-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/7926e18a-0051-440f-be17-4d7e427861c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/5c82a608.1c69fb81.b8d24.c2d3%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to