How can I neglect higher orders of approximation in Mathematica?

Suppose I want to find the roots of a simple quadratic equation like

x^2 + (b + Epsilon)*x + c == 0

where Epsilon << 1. Obviously, the roots are

x -> 1/2 (-b - Epsilon - Sqrt[-4 c + (b + Epsilon)^2])
x -> 1/2 (-b - Epsilon + Sqrt[-4 c + (b + Epsilon)^2])

Now, how can I neglect Epsilon^2?

  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Sep 19 '15 at 18:49

You can use Series to specify the order of approximation. When an expression involving the output of Series, which is a SeriesData object, is evaluated, the calculus is done for you.

sol = Solve[x^2 + (b + Epsilon)*x + c == 0, x]
approx = sol /. Epsilon -> Series[Epsilon, {Epsilon, 0, 1}] // Normal

Mathematica graphics

Alternatively, you could apply Series to the formula directly (use Normal to chop off the big-Oh term).

Series[x /. sol, {Epsilon, 0, 1}]

Mathematica graphics


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.