Message Boards Message Boards

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

Is it possible to remove terms dependent on a specific variable?

Posted 10 years ago
POSTED BY: inkwan Park
2 Replies
Posted 10 years ago

Hello, Alexei. I appreciate your help. It works perfectly, I can completely remove terms depend on "f."

Have a wonderful month and take care!

Best regards,

:: Inkwan

POSTED BY: inkwan Park

Hi, Inkwan, Your expression contains a syntax error. It is not possible to use the expressions like [Eta], [Eta]^2 etc., since the square brackets are reserved to only be used for arguments of functions. So I did not use you whole example, but a part of it to which I added two f-independent terms:

expr = 8 (-1 + 
     5 c^2) (3 Cos[
       2 (g + f)] + (3 Cos[2 g + f] + Cos[2 g + 3 f]) e) s^2 Eta^5 + 
  Sin[g] + Cos[c]

Now, try this:

 Select[(expr // Expand), FreeQ[#, f] &]

(*    Cos[c] + Sin[g]  *)

Have fun!

POSTED BY: Alexei Boulbitch
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