Ask Your Question
0

Solve an expression with fractional exponents

asked 2013-02-27 20:16:53 +0200

adamhg gravatar image

I have an expression which, effectively, looks like this:

expr = x == x^(1/3)*y

except y is a really large number of constants. If I wanted to solve this for x, I should get x=y^(3/2). But instead:

solve(expr,x)

yields

[x == x^(1/3)*y]

In the example I gave, it's obviously not a big deal. But for my actual code, y is a very large number of constant factors, and this means copying those factors out by hand, and then re-inputting them in the correct form ( x = (factors)^(3/2) ) which is error prone and time consuming.

I've tried using 0.333 instead of (1/3) in the exponent, that doesn't make a difference.

Any help here would be appreciated. Thank you ahead of time!

edit retag flag offensive close merge delete

Comments

Just for info - it's not only the `y` that's the problem. `solve(x==x^(1/3),x)` does the same thing. `solve(x==x^(1/3),x,to_poly_solve=True)` solves that problem, but not your question...

kcrisman gravatar imagekcrisman ( 2013-02-27 21:21:00 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-28 09:35:11 +0200

calc314 gravatar image

I tried solve(expr^3,x) and this worked for your simple case.

sage: solve(expr^3,x)

[x == -y^(3/2), x == y^(3/2), x == 0]

I don't know how it will perform with a more complicated expression.

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

Stats

Asked: 2013-02-27 20:16:53 +0200

Seen: 554 times

Last updated: Feb 28 '13