Message Boards Message Boards

0
|
3767 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Replace term in another term by a variable?

Posted 7 years ago

I want to replace a term y2 which is included in another term y4 by a variable such as yy4. I tried some common function but I didn’t get a result.

y4 = (A1 (-Fc - fl + A1 pL) (-((A1 beta)/(A1 sp + V01)) - (
      A2 beta \[Alpha])/(-A2 sp + V02)))/mp^2 + 1/mp A1 wp ;

y2 = (-Fc - fl + A1 pL)/mp;

The expected result:

result = (
   A1 *yy4* (-((A1 beta)/(A1 sp + V01)) - (
      A2 beta \[Alpha])/(-A2 sp + V02)))/mp + 1/mp A1 wp ;

Many thanks in advance.

2 Replies

Yes, exactly what i searched for.. many thanks

Posted 7 years ago

Is this close enough to what you need?

y4 = (A1 (-Fc-fl+A1 pL)(-((A1 beta)/(A1 sp+V01))-(A2 beta ?)/(-A2 sp+V02)))/mp^2+1/mp A1 wp;
y2 = (-Fc - fl + A1 pL)/mp;
result = Simplify[y4, y2 == yy4];

Simplify[result == (A1 yy4 (-((A1 beta)/(A1 sp+V01))-(A2 beta ?)/(-A2 sp+V02)))/mp+1/mp A1 wp]

returns True

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

Group Abstract Group Abstract