Register to reply

Small quantities in mathematica

by JohnSimpson
Tags: mathematica, quantities
Share this thread:
JohnSimpson
#1
Jun8-11, 01:33 PM
P: 91
Hi, I'm doing a calculation in which I have a small parameter [tex]\epsilon[/tex] floating around, and I want to automatically remove terms of order [tex]\epsilon^2[/tex] and higher. Is this possible to do?
Phys.Org News Partner Science news on Phys.org
Hoverbike drone project for air transport takes off
Earlier Stone Age artifacts found in Northern Cape of South Africa
Study reveals new characteristics of complex oxide surfaces
phyzguy
#2
Jun8-11, 01:43 PM
P: 2,179
Sure! Just use:

Series[Expression,{epsilon,0,1}]. this will expand Expression in a power series about epsilon=0, and only keep terms up to order 1. If you use Normal[Series[Expression,{epsilon,0,1}]], that will get rid of the annoying O(epsilon^2) terms floating around.
JohnSimpson
#3
Jun8-11, 02:23 PM
P: 91
Thanks!! One more question. Lets say I had something like

[tex]
\left(
\begin{array}{cc}
-2 \varepsilon & 1-\varepsilon \\
-1+\varepsilon & -1+2 \varepsilon
\end{array}
\right)
[/tex]

How could I retain the multiplicative terms but ditch the additive terms, so that this simplifies to

[tex]
\left(
\begin{array}{cc}
-2 \varepsilon & 1 \\
-1 & -1
\end{array}
\right)
[/tex]

phyzguy
#4
Jun8-11, 02:52 PM
P: 2,179
Small quantities in mathematica

What you're asking doesn't make sense to me. In the upper left you kept the multiplicative term (2 epsilon) and not the additive term (0), while in the upper right you kept the additive term (1) and not the multiplicative term (- epsilon). What do you want to do exactly? If you can specify precisely what you want to do, we can program the computer to do it.
JohnSimpson
#5
Jun8-11, 04:50 PM
P: 91
Right, sorry. What I want to do is say that epsilon is small compared to some other number, in this case 1, but to keep epsilon finite.

[tex]
0 < \varepsilon << 1
[/tex]

Therefore, -1 + 2epsilon is ROUGHLY -1. So the first matrix above simplifies under this approximation to the second one.

EDIT: Hmmm, actually, I don't think the power series expansion is quite what I'm looking for. I'd like to have

[tex]
f(x) = \sqrt{x^2 + \varepsilon + \varepsilon^2} \simeq \sqrt{x^2 + \varepsilon}
[/tex]

since terms of eps^2 are very small compared to terms of power eps, but x is comparable to epsilon for small enough x. Unless I'm very confused a power series expansion in epsilon will not give me this. Any thoughts would be appreciated.
Bill Simpson
#6
Jun11-11, 11:48 AM
P: 1,028
Perhaps you can adapt something like this

In[1]:= {{-2ξ,1-ξ},{-1+ξ,-1+2ξ}}/.{x_+_*ξ->x,x_+ξ->x}

Out[1]= {{-2 ξ,1},{-1,-1}}

Or perhaps

In[2]:= Sqrt[x + ξ + ξ^2] /. ξ^2 -> 0

Out[2]= Sqrt[x + ξ]

Limit[expression,ξ->0] won't do what you want and I can't think of a single simple pattern substitution that will do all and only the things you want in all the kinds of expressions that someone could come up with.

With any pattern matching in particular and any Mathematica result in general you should carefully check the results to make sure there are no errors


Register to reply

Related Discussions
In binary can we have a value with deci centi mili or more lower valued prefix? Computers 14
Which quantities are naturally forms, and which are (multi)vectors? Differential Geometry 3
&quot;Killing vectors and conserved quantities&quot; General Physics 0
Principia Mathematica worth reading ? Math & Science Software 16
General quantities in chemical reactions questions Chemistry 2