Collecting terms in mathematica

  • Context: Mathematica 
  • Thread starter Thread starter dimwatt
  • Start date Start date
  • Tags Tags
    Mathematica Terms
Click For Summary
SUMMARY

The discussion focuses on collecting terms in Mathematica that have specific poles in their denominators, such as (x-1) and (x-5). The user initially attempted to use the Collect function but found it ineffective for their multi-dimensional integral expression. A solution was provided using the Select function to filter terms based on their denominators, demonstrating a method to isolate terms containing specific poles. The example given illustrates how to extract terms from a list structure based on pole criteria.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of mathematical poles and their significance in integrals
  • Basic knowledge of list manipulation in Mathematica
  • Experience with multi-dimensional integrals
NEXT STEPS
  • Explore the Collect function in Mathematica for polynomial expressions
  • Learn about the Select function for filtering lists in Mathematica
  • Investigate handling multi-dimensional integrals in Mathematica
  • Study the concept of poles and residues in complex analysis
USEFUL FOR

Mathematica users, mathematicians, and researchers working with integrals and needing to manage expressions with specific poles in their denominators.

dimwatt
Messages
8
Reaction score
0
I have an integrand with a handful of terms, and some of them have poles in the denominator of the form (x+c) (but not all). There are three poles in total, and I want to collect all the terms according to each pole individually (eg all the terms with (x-1) in the denominator, (x-5), etc.)

How could I do this? I tried using collect just to see if mathematica would make any rearrangements at all, but I'm not having much luck with it.
 
Physics news on Phys.org
Without an example of what you have or what you have tried it is difficult to guess what to say.

Is this anything like what you want to do?

In[1]:= Collect[4/(x-g) + (a+b^2)/(x-f) + 2 q/(x-f) - 5/(x-f) - c/(x-g), {1/(x-f), 1/(x-g)}]

Out[1]= (-5 + a + b^2 + 2 q)/(-f + x) + (4 - c)/(-g + x)
 
Hi Bill!

Sorry I should have been much more specific. Each term in my expression involves several products in their denominators, and of those terms, some of them have poles like (x-1) and (y-1) and sometimes both, like N/(x+1)(y+1)(x-1)... for example (this is a multi-dimensional integral). I'm a bit new to mathematica so my terminology or descriptions might be a bit weird.. but basically I have the expression in list form, and I found that, e.g.,

Select[expr, MemberQ[#[[2]], (-1 + x)] &]

(the [[2]] is just a detail regarding the arrangement of the list) picks out the terms I was looking for. Thanks!
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K