Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Extracting terms

  • To: mathgroup at
  • Subject: [mg533] Extracting terms
  • From: Xah Y Lee <xyl10060 at>
  • Date: Thu, 9 Mar 1995 16:39:45 -0800 (PST)

 how to extract terms containing the first nth power of a variable from 
an expresion?

Summary of solutions:

Clear[poly, n]
poly = Sum[ a x^i y^j, {i,0, 3}, {j,0,3}]
n = 2;
Normal[poly + O[x]^(n+1)]
Select[poly, (Exponent[#,x]<= 2) &]
poly /. ((x^m_)/; m>n) ->0

(sorry I don't have the names for proper credit)

 Xah Lee                xyl10060 at
 Student at Foothill College
 Mountain View, CA

  • Prev by Date: Mathematica Conference
  • Next by Date: Re: any better to apply a function to second column?
  • Previous by thread: Mathematica Conference
  • Next by thread: any better to apply a function...