Ask Your Question

How do I calculate the first solution, without calculating all the others?

asked 2021-08-07 19:31:42 +0200

Periodic_1_6 gravatar image

How do I calculate the first solution, without calculating all the others?


eq0 = x^100-3 == 0

solutions = solve([eq0],x)
sol0 = solutions 
edit retag flag offensive close merge delete


How do you define the "first solution"? Are there any constraints that you would like to put on the result?

tolga gravatar imagetolga ( 2021-08-08 00:23:30 +0200 )edit

If this is your actual problem, in this case, you could directly ask for 3^(1/100) for instance. If you are interested in real solutions, you could try solve(x^100 == 3, x, algorithm='sympy', domain='real').

FabianG gravatar imageFabianG ( 2021-08-08 01:25:40 +0200 )edit

@tolga any, as long as you only calculate that.

Periodic_1_6 gravatar imagePeriodic_1_6 ( 2021-08-08 09:53:24 +0200 )edit

@FabianG my problem is: I have a non-linear system to solve and since my PC is old I would like to calculate a single solution, not all of them to reduce the time.

Periodic_1_6 gravatar imagePeriodic_1_6 ( 2021-08-08 10:19:31 +0200 )edit

if you want to see what we are talking about, look here (

Periodic_1_6 gravatar imagePeriodic_1_6 ( 2021-08-08 11:24:40 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-08 22:23:36 +0200

tmonteil gravatar image

If you are interested in the numerical value, you can do:

sage: f = x^100-3
sage: find_root(f,0,10)

You can check:

sage: 3^(1/100).n()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-08-07 19:31:42 +0200

Seen: 203 times

Last updated: Aug 08 '21