Group Abstract Group Abstract

Message Boards Message Boards

0
|
160 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Simplifying a term to achieve a certain result

Posted 6 days ago

Run the following code

(5/x - 7/(x + 1)) ((x + 1) - x)

This result is expected because ((x + 1) - x) simplifies to 1.

5/x - 7/(1 + x)

But I was expecting this result as following instead.What's the code implementation for this?

-12 + (7 x)/(1 + x) + (5 (1 + x))/x
POSTED BY: Jim Clinton
4 Replies

This does what you want:

Apart[(5/x - 7/y) (y - x)] /. y -> x + 1
POSTED BY: Gianluca Gorni
Posted 3 days ago
POSTED BY: Jim Clinton
POSTED BY: Michael Rogers
Posted 3 days ago

The operation involves treating ( x + 1 ) (x+1) and x x as separate entities and multiplying each with the terms inside the other parentheses, rather than computing ( x + 1 − x ) (x+1−x) first—which is how your code implements it. Thank you very much!

POSTED BY: Jim Clinton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard