Ask Your Question
3

why can't sage solve the equation x^n == 2*x ?

asked 2013-07-22 13:50:43 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

sage: var('x n')
(x, n)
sage: solve(x^n==2*x,x)
[x == 1/2*x^n]

This is not what I expect.

Who can help?

Thanks.

edit retag flag offensive close merge delete

Comments

One issue here is that after declaring that x and n are symbolic variables, Sage still does not know anything more than that about x and n. So, Sage does not know whether x and n are reals, integers, etc. Thus, we need to `assume(n,'integer')` and `assume(x,'real')`. Unfortunately, at this point, you still don't get a solution. Sage is calling Maxima to solve this equation, and I cannot get Maxima to solve it either. Ideas?

calc314 gravatar imagecalc314 ( 2013-07-22 22:22:34 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-06-30 10:22:12 +0100

rws gravatar image

updated 2014-06-30 10:22:59 +0100

Since you named one variable n I assume you meant integer. But even this has infinitely many solutions! Sage can give them for specific n:

sage: [solve(x^n==2*x,x) for n in range(1,5)]
[[x == 0],
 [x == 0, x == 2],
 [x == -sqrt(2), x == sqrt(2), x == 0],
 [x == 1/2*I*sqrt(3)*2^(1/3) - 1/2*2^(1/3), x == -1/2*I*sqrt(3)*2^(1/3) - 1/2*2^(1/3), x == 2^(1/3), x == 0]]
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

Stats

Asked: 2013-07-22 13:50:43 +0100

Seen: 593 times

Last updated: Jun 30 '14