Extracting terms
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg533] Extracting terms
- From: Xah Y Lee <xyl10060 at fhda.edu>
- Date: Thu, 9 Mar 1995 16:39:45 -0800 (PST)
Problem:
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@Series[poly,{x,0,n}]
--
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 tiptoe.fhda.edu
Student at Foothill College
Mountain View, CA