Ask Your Question
2

Full simplification of power doesn't work

asked 2020-05-10 00:22:33 +0100

Cyrille gravatar image
     x, a =SR.var('x a')
    Uf1= x^a
    ar1_x=diff(Uf1, x).full_simplify()
    ar1_xx=diff(Uf1, x,2)
    raar1 = -diff(Uf1, x,2)/diff(Uf1, x).full_simplify()
    show(LatexExpr("U^{'}(x) ="+latex(ar1_x)))
    show(LatexExpr("U^{''}(x) ="+latex(ar1_xx)))
    show(LatexExpr("R_a(x) ="+latex(raar1)))

Why raar1 is not fully simplified ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-05-10 04:18:16 +0100

tmonteil gravatar image

When you write:

raar1 = -diff(Uf1, x,2)/diff(Uf1, x).full_simplify()

what is fully simplified is diff(Uf1, x), not diff(Uf1, x,2)/diff(Uf1, x)

If you want the full_simplify method to be applied to the whole diff(Uf1, x,2)/diff(Uf1, x), you have to add parentheses :

sage: raar1 = -(diff(Uf1, x,2)/diff(Uf1, x)).full_simplify()
sage: raar1
-(a - 1)/x
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: 2020-05-10 00:22:33 +0100

Seen: 694 times

Last updated: May 10 '20