0
$\begingroup$

I want to neglect the terms containing second and higher powers of a from some equations. Since the equations are lengthy expressions, I was using Mathematica to neglect these terms. I have tried but I was unable. Can anyone please help me in this regard?

For example, for the following equation, I want to remove the terms containing a^2 and higher powers than 2.

(2 r^4 (4 a^2 + (27 c13)/(16 (-1 + c13)) + r^2 (Q + (-2 + r) r))^3 ((
    81 c13)/(-1 + c13) + 16 r^2 (2 Q + (-3 + r) r) + 
    24 a Sqrt[-((54 c13)/(-1 + c13)) + 16 r^2 (-Q + r)])), (-((
    a^2 (-16 r^2 (Q + (-2 + r) r) + 
       c13 (27 + 16 Q r^2 - 32 r^3 + 16 r^4))^2)/(
    4 (-1 + c13)^2 r^2)) + 
   16 a^3 Sqrt[1 + (27 c13)/(16 (-1 + c13) r^4) + (Q - 2 r)/r^2]
     Sqrt[(27 c13)/(-1 + c13) + 
     16 r^2 (Q + (-2 + r) r)] (-12 a + 
      Sqrt[-((54 c13)/(-1 + c13)) + 16 r^2 (-Q + r)]) + (
   4 a^2 ((27 c13)/(16 (-1 + c13)) + r^2 (Q + (-2 + r) r)) (-12 a + 
      Sqrt[-((54 c13)/(-1 + c13)) + 16 r^2 (-Q + r)])^2)/
   r^2 + (((27 c13)/(16 (-1 + c13)) + r^2 (Q + (-2 + r) r)) (4 a^2 + (
      27 c13)/(16 (-1 + c13)) + r^2 (Q + (-2 + r) r)) (-12 a + 
      Sqrt[-((54 c13)/(-1 + c13)) + 16 r^2 (-Q + r)])^2)/
   r^2)/((4 a^2 + (27 c13)/(16 (-1 + c13)) + 
     r^2 (Q + (-2 + r) r))^2 ((81 c13)/(-1 + c13) + 
     16 r^2 (2 Q + (-3 + r) r) + 
     24 a Sqrt[-((54 c13)/(-1 + c13)) + 16 r^2 (-Q + r)]))  
$\endgroup$
  • $\begingroup$ Try yourexpression /. a^_ -> 0 and check that VERY carefully to make certain it is correct, don't just think "it sort of looked like it worked once so it must always be right." $\endgroup$ – Bill Sep 15 at 9:21
  • $\begingroup$ You know that there is a ',' in the expression that you wrote, right? This must be a typo. It's in the third line of the expression $\endgroup$ – DiSp0sablE_H3r0 Sep 15 at 10:55
  • $\begingroup$ yes, this is typo. $\endgroup$ – MMS Sep 15 at 10:59
  • $\begingroup$ Thanks @Bill, yes it is "yourexpression /. a^_ -> 0" working , but it is not working when we have higher powers of a after multiplication, like, if we have a (x + a), then after multiplication, we have term a^2, so it is not neglecting using this command. $\endgroup$ – MMS Sep 15 at 11:06
  • 1
    $\begingroup$ Mathematica's pattern matching only applies when it finds exactly the form of the expression that you are looking for. To expose those powers of a try Expand[yourexpression] /. a^_ -> 0 which should find more cases where there are powers of a in yourexpression. But even this may not be enough if you are expecting more and more complicated examples to work. That was why I asked you to check VERY carefully. $\endgroup$ – Bill Sep 15 at 15:27
1
$\begingroup$

You seem to be looking for the linear approximation. That is the first two terms of the Taylor series. For example:

Normal[Series[(a + x) (a - x) (a - 2 x), {a, 0, 1}]]

yields

-a x^2 + 2 x^3 
| improve this answer | |
$\endgroup$
  • $\begingroup$ This command is not working in my case because the equations are in square root, like (Sqrt[1 + (27 c13)/(16 (-1 + c13) r^4) + (Q - 2 r)/r^2] Sqrt[ 64 a^2 + (27 c13)/(-1 + c13) + 16 r^2 (Q + (-2 + r) r) + a^3 (x + a)])/Sqrt[(81 c13)/(-1 + c13) + 16 r^2 (2 Q + (-3 + r) r) + 24 a (-4 a + Sqrt[2] Sqrt[8 a^2 - (27 c13)/(-1 + c13) + 8 r^2 (-Q + r)])] $\endgroup$ – MMS Sep 15 at 11:38
  • 4
    $\begingroup$ The response given applies perfectly well to the example provided. If you do not post an example with the full pathology then you cannot expect that all responses will apply in general. $\endgroup$ – Daniel Lichtblau Sep 15 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.