Ask Your Question

How to simplify expression after diff so that the denominator remains unchanged relative to the initial expression. [closed]

asked 2023-10-22 20:48:05 +0200

y023rus gravatar image

Dear experts, I have next initial expression: $$y=\dfrac{2x-3}{5-2x}$$ and I need find y'. In this case I use rule $$\left( \dfrac{u}{v} \right)' = \dfrac{u'v-uv'}{v^2} $$ and expect to obtain next result after simplification: $$y' = \dfrac{4}{(5-2x)^2}$$ But after diff((2x-3)/(5-2x),x) and simplification with factor() I get. $$y' = \dfrac{4}{(2x-5)^2}$$ How I can get $$(5-2x)^2$$ in denominator of derivative?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by y023rus
close date 2023-10-24 20:21:12.590365

1 Answer

Sort by ยป oldest newest most voted

answered 2023-10-23 20:45:49 +0200

Max Alekseyev gravatar image

You can use .denominator() to extract the denominator:



edit flag offensive delete link more


your code gives $(2x - 5)^2$ not $(5-2x)^2$ as I need

y023rus gravatar imagey023rus ( 2023-10-24 14:16:02 +0200 )edit

Mathematically speaking, it's the same expression. It's just a matter of how Sage orders terms in the representation. There is not much you can do about that, see for details and further references.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-10-24 17:57:39 +0200 )edit

Question Tools

1 follower


Asked: 2023-10-22 20:48:05 +0200

Seen: 108 times

Last updated: Oct 23 '23