Ask Your Question
0

Simplification fails

asked 2020-04-27 11:18:46 +0200

Cyrille gravatar image

updated 2020-04-27 14:39:54 +0200

1) I have tried nearly all simplification methods, expansion, factorization, collect... on the following code for Ra1

var("x,a")
Ra1 = -diff(x^a, x,2)/diff(x^a, x)
show(Ra1)

but the self-evident simplification doesn't work. I wonder why. I also have tried to add assumption even I do not see why since it's only algebra

2) Is there a way to ask SM to factor on a variable ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-27 15:19:32 +0200

slelievre gravatar image

updated 2020-04-27 15:47:09 +0200

The first question is about simplyfing a symbolic expression.

The method simplify_log seems to do the trick.

sage: x, a = SR.var('x a')
sage: Ra1 = -diff(x^a, x,2)/diff(x^a, x)
sage: Ra1
-(a - 1)*x^(a - 2)/x^(a - 1)
sage: Ra1.simplify_log()
-(a - 1)/x

I suppose the second question is about SageManifolds, but I'm not sure exactly what the question is.

Maybe this can help:

edit flag offensive delete link more

Comments

when I apply simplify_log() I have the following error

ECL says: Error executing code in Maxima:

Cyrille gravatar imageCyrille ( 2020-04-27 16:46:27 +0200 )edit

@Cyrille I have no error, maybe you forget to change the code from var to SR.var

Masacroso gravatar imageMasacroso ( 2020-04-27 21:25:29 +0200 )edit

@Masacroso -- No, var vs SR.var is not it, you can test that you would get the same either way.

@Cyrille -- what operating system, what version of Sage, how it was installed, whether is it based on Python 2 or Python 3.

slelievre gravatar imageslelievre ( 2020-04-27 22:51:07 +0200 )edit

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: 2020-04-27 11:18:46 +0200

Seen: 51 times

Last updated: Apr 27 '20