Movatterモバイル変換


[0]ホーム

URL:


WOLFRAM

Wolfram Language & System Documentation Center
Series, Limits, and Residues

Series, Limits, and Residues

Sums and Products
This constructs the sum:
You can leave out the lower limit if it is equal to 1:
This makesi increase in steps of 2, so that only oddnumbered values are included:
Products work just like sums:
Sum[f,{i,imin,imax}]
the sum
Sum[f,{i,imin,imax,di}]
the sum withi increasing in steps ofdi
Sum[f,{i,imin,imax},{j,jmin,jmax}]
the nested sum
Product[f,{i,imin,imax}]
the product
Sums and products.
This sum is computed symbolically as a function ofn:
The Wolfram System can also give an exact result for this infinite sum:
As with integrals, simple sums can lead to complicated results:
This sum cannot be evaluated exactly using standard mathematical functions:
You can nevertheless find a numerical approximation to the result:
The Wolfram Language also has a notation for multiple sums and products.Sum[f,{i,imin,imax},{j,jmin,jmax}] represents a sum overi andj, which would be written in standard mathematical notation as. Notice that in Wolfram Language notation, as in standard mathematical notation, the range of theoutermost variable is givenfirst.
This is the multiple sum. Notice that the outermost sum overi is given first, just as in the mathematical notation:
The way the ranges of variables are specified inSum andProduct is an example of the rather generaliterator notation that the Wolfram Language uses. You will see this notation again when we discuss generating tables and lists usingTable ("Making Tables of Values"), and when we describeDo loops ("Repetitive Operations").
{imax}
iterateimax times, without incrementing any variables
{i,imax}
i goes from1 toimax in steps of1
{i,imin,imax}
i goes fromimin toimax in steps of1
{i,imin,imax,di}
i goes fromimin toimax in steps ofdi
{i,imin,imax},{j,jmin,jmax},
i goes fromimin toimax, and for each such value,j goes fromjmin tojmax, etc.
Wolfram Language iterator notation.
Power Series
The mathematical operations we have discussed so far areexact. Given precise input, their results are exact formulas.
In many situations, however, you do not need an exact result. It may be quite sufficient, for example, to find anapproximate formula that is valid, say, when the quantityx is small.
This gives a power series approximation to for close to, up to terms of order:
The Wolfram Language knows the power series expansions for many mathematical functions:
If you give it a function that it does not know,Series writes out the power series in terms of derivatives:
Power series are approximate formulas that play much the same role with respect to algebraic expressions as approximate numbers play with respect to numerical expressions. The Wolfram Language allows you to perform operations on power series, in all cases maintaining the appropriate order or "degree of precision" for the resulting power series.
Here is a simple power series, accurate to order:
When you do operations on a power series, the result is computed only to the appropriate order inx:
This turns the power series back into an ordinary expression:
Now the square is computedexactly:
ApplyingExpand gives a result with 11 terms:
Series[expr,{x,x0,n}]
find the power series expansion ofexpr about the pointx=x0 to at mostnth order
Normal[series]
truncate a power series to give an ordinary expression
Power series operations.
Making Power Series Expansions
Series[expr,{x,x0,n}]
find the power series expansion ofexpr about the pointx=x0 to order at most(x-x0)n
Series[expr,{x,x0,nx},{y,y0,ny}]
find series expansions with respect toy, thenx
Functions for creating power series.
Here is the power series expansion for about the point to order :
Here is the series expansion of about the point:
If the Wolfram Language does not know the series expansion of a particular function, it writes the result symbolically in terms of derivatives:
In mathematical terms,Series can be viewed as a way of constructing Taylor series for functions.
The standard formula for the Taylor series expansion about the point of a function withth derivative is. Whenever this formula applies, it gives the same results asSeries. (For common functions,Series nevertheless internally uses somewhat more efficient algorithms.)
Series can also generate some power series that involve fractional and negative powers, not directly covered by the standard Taylor series formula.
Here is a power series that contains negative powers ofx:
Here is a power series involving fractional powers ofx:
Series can also handle series that involve logarithmic terms:
There are, of course, mathematical functions for which no standard power series exist. The Wolfram Language recognizes many such cases.
Series sees that has an essential singularity at, and does not produce a power series:
Series can nevertheless give you the power series for about the point:
Especially when negative powers occur, there is some subtlety in exactly how many terms of a particular power series the functionSeries will generate.
One way to understand what happens is to think of the analogy between power series taken to a certain order, and real numbers taken to a certain precision. Power series are "approximate formulas" in much the same sense as finiteprecision real numbers are approximate numbers.
The procedure thatSeries follows in constructing a power series is largely analogous to the procedure thatN follows in constructing a realnumber approximation. Both functions effectively start by replacing the smallest pieces of your expression by finiteorder, or finiteprecision, approximations, and then evaluating the resulting expression. If there are, for example, cancellations, this procedure may give a final result whose order or precision is less than the order or precision that you originally asked for. LikeN, however,Series has some ability to retry its computations so as to get results to the order you ask for. In cases where it does not succeed, you can usually still get results to a particular order by asking for a higher order than you need.
Series compensates for cancellations in this computation, and succeeds in giving you a result to order:
When you make a power series expansion in a variablex, the Wolfram Language assumes that all objects that do not explicitly containx are in fact independent ofx.Series thus does partial derivatives (effectively usingD) to build up Taylor series.
Botha andn are assumed to be independent ofx:
a[x] is now given as an explicit function ofx:
You can useSeries to generate power series in a sequence of different variables.Series works likeIntegrate,Sum, and so on, and expands first with respect to the last variable you specify.
Series performs a series expansion successively with respect to each variable. The result in this case is a series inx, whose coefficients are series iny:
The Representation of Power Series
Power series are represented in the Wolfram System asSeriesData objects.
The power series is printed out as a sum of terms, ending withO[x] raised to a power:
Internally, however, the series is stored as aSeriesData object:
By usingSeriesData objects, rather than ordinary expressions, to represent power series, the Wolfram System can keep track of the order and expansion point, and do operations on the power series appropriately. You should not normally need to know the internal structure ofSeriesData objects.
You can recognize a power series that is printed out in standard output form by the presence of anO[x] term. This term mimics the standard mathematical notation, and represents omitted terms of order. For various reasons of consistency, the Wolfram System uses the notationO[x]^n for omitted terms of order, corresponding to the mathematical notation, rather than the slightly more familiar, though equivalent, form.
Any time that an object likeO[x] appears in a sum of terms, the Wolfram System will in fact convert the whole sum into a power series.
The presence ofO[x] makes the Wolfram System convert the whole sum to a power series:
Series objects can involve fractional powers:
Here is the internal representation of the series:
Series can involve logarithmic terms:
The logarithmic factors appear explicitly inside theSeriesData coefficient list:
Operations on Power Series
The Wolfram Language allows you to perform many operations on power series. In all cases, the Wolfram Language gives results only to as many terms as can be justified from the accuracy of your input.
Here is a power series accurate to fourth order in:
When you square the power series, you get another power series, also accurate to fourth order:
Taking the logarithm gives you the result2x, but only to order:
The Wolfram Language keeps track of the orders of power series in much the same way as it keeps track of the precision of approximate real numbers. Just as with numerical calculations, there are operations on power series which can increase, or decrease, the precision (or order) of your results.
Here is a power series accurate to order:
This gives a power series that is accurate only to order:
The Wolfram Language also allows you to do calculus with power series.
Here is a power series for:
Here is its derivative with respect tox:
Integrating with respect tox gives back the original power series:
When you perform an operation that involves both a normal expression and a power series, the Wolfram Language "absorbs" the normal expression into the power series whenever possible.
The1 is automatically absorbed into the power series:
Thex^2 is also absorbed into the power series:
If you addSin[x], the Wolfram Language generates the appropriate power series forSin[x], and combines it with the power series you have:
The Wolfram Language also absorbs expressions that multiply power series. The symbola is assumed to be independent ofx:
The Wolfram Language knows how to apply a wide variety of functions to power series. However, if you apply an arbitrary function to a power series, it is impossible for the Wolfram Language to give you anything but a symbolic result.
The Wolfram Language does not know how to apply the functionf to a power series, so it just leaves the symbolic result:
Composition and Inversion of Power Series
When you manipulate power series, it is sometimes convenient to think of the series as representingfunctions, which you can, for example, compose or invert.
ComposeSeries[series1,series2,]
compose power series
InverseSeries[series,x]
invert a power series
Composition and inversion of power series.
Here is the power series for to order:
This replaces the variable in the power series for by a power series for:
The result is the power series for:
If you have a power series for a function, then it is often possible to get a power series approximation to the solution for in the equation. This power series effectively gives the inverse function such that. The operation of finding the power series for an inverse function is sometimes known asreversion of power series.
Here is the series for:
Inverting the series gives the series for:
This agrees with the direct series for:
Composing the series with its inverse gives the identity function:
Converting Power Series to Normal Expressions
Normal[expr]
convert a power series to a normal expression
Converting power series to normal expressions.
Power series in the Wolfram Language are represented in a special internal form, which keeps track of such attributes as their expansion order.
For some purposes, you may want to convert power series to normal expressions. From a mathematical point of view, this corresponds to truncating the power series, and assuming that all higherorder terms are zero.
This generates a power series, with four terms:
Squaring the power series gives you another power series, with the appropriate number of terms:
Normal truncates the power series, giving a normal expression:
You can now apply standard algebraic operations:
SeriesCoefficient[series,n]
give the coefficient of thenth order term in a power series
Extracting coefficients of terms in power series.
This gives the coefficient of in the original power series:
This gives the coefficient for the term in the Taylor expansion of the function about zero:
Solving Equations Involving Power Series
LogicalExpand[series1==series2]
give the equations obtained by equating corresponding coefficients in the power series
Solve[series1==series2,{a1,a2,}]
solve for coefficients in power series
Solving equations involving power series.
Here is a power series:
This gives an equation involving the power series:
LogicalExpand generates a sequence of equations for each power ofx:
This solves the equations for the coefficientsa[i]. You can also feed equations involving power series directly toSolve:
Some equations involving power series can also be solved using theInverseSeries function discussed in"Composition and Inversion of Power Series".
Summation of Series
Sum[expr,{n,nmin,nmax}]
find the sum ofexpr asn goes fromnmin tonmax
Evaluating sums.
The Wolfram System recognizes this as the power series expansion of:
This sum comes out in terms of a Bessel function:
Here is another sum that can be done in terms of common special functions:
Generalized hypergeometric functions are not uncommon in sums:
There are many analogies between sums and integrals. And just as it is possible to have indefinite integrals, so indefinite sums can be set up by using symbolic variables as upper limits.
This is effectively an indefinite sum:
This sum comes out in terms of incomplete gamma functions:
This sum involves polygamma functions:
Taking the difference between results for successive values of gives back the original summand:
The Wolfram System can do essentially all sums that are found in books of tables. Just as with indefinite integrals, indefinite sums of expressions involving simple functions tend to give answers that involve more complicated functions. Definite sums, like definite integrals, often, however, come out in terms of simpler functions.
This indefinite sum gives a quite complicated result:
The definite form is much simpler:
Here is a slightly more complicated definite sum:
Solving Recurrence Equations
If you represent thenth term in a sequence asa[n], you can use arecurrence equation to specify how it is related to other terms in the sequence.
RSolve takes recurrence equations and solves them to get explicit formulas fora[n].
This solves a simple recurrence equation:
This takes the solution and makes an explicit table of the first 10a[n]:
RSolve[eqn,a[n],n]
solve a recurrence equation
Solving a recurrence equation.
This solves a recurrence equation for a geometric series:
This gives the same result:
This gives an algebraic solution to a recurrence equation:
This solves the Fibonacci recurrence equation:
RSolve can be thought of as a discrete analog ofDSolve. Many of the same functions generated in solving differential equations also appear in finding symbolic solutions to recurrence equations.
This generates a gamma function, which generalizes the factorial:
This secondorder recurrence equation comes out in terms of Bessel functions:
RSolve does not require you to specify explicit values for terms such asa[1]. LikeDSolve, it automatically introduces undetermined constantsC[i] to give a general solution.
This gives a general solution with one undetermined constant:
RSolve can solve equations that do not depend only linearly ona[n]. For nonlinear equations, however, there are sometimes several distinct solutions that must be given. Just as for differential equations, it is a difficult matter to find symbolic solutions to recurrence equations, and standard mathematical functions only cover a limited set of cases.
Here is the general solution to a nonlinear recurrence equation:
This gives two distinct solutions:
RSolve can solve not only ordinarydifference equations in which the arguments of differ by integers, but alsodifference equations in which the arguments of are related by multiplicative factors.
This solves thedifference analog of the factorial equation:
Here is a secondorderdifference equation:
RSolve[{eqn1,eqn2,},{a1[n],a2[n],},n]
solve a coupled system of recurrence equations
Solving systems of recurrence equations.
This solves a system of two coupled recurrence equations:
RSolve[eqns,a[n1,n2,],{n1,n2,}]
solve partial recurrence equations
Solving partial recurrence equations.
Just as one can set up partial differential equations that involve functions of several variables, so one can also set up partial recurrence equations that involve multidimensional sequences. Just as in the differential equations case, general solutions to partial recurrence equations can involve undetermined functions.
This gives the general solution to a simple partial recurrence equation:
Finding Limits
In doing many kinds of calculations, you need to evaluate expressions when variables take on particular values. In many cases, you can do this simply by applying transformation rules for the variables using the/. operator.
You can get the value of at 0 just by explicitly replacing with 0, and then evaluating the result:
In some cases, however, you have to be more careful.
Consider, for example, finding the value of the expression when. If you simply replace by in this expression, you get the indeterminate result. To find the correct value of when, you need to take thelimit.
Limit[expr,x->x0]
find the limit ofexpr whenx approachesx0
Finding limits.
This gives the correct value for the limit of as:
No finite limit exists in this case:
Limit can find this limit, even though you cannot get an ordinary power series for at:
The same is true here:
The value ofSign[x] at is0:
Itslimit, however, is1. The limit is by default taken from above:
Not all functions have definite limits at particular points. For example, the function oscillates infinitely often near, so it has no definite limit there. Nevertheless, at least so long as remains real, the values of the function near always lie between and.Limit represents values with bounded variation usingInterval objects. In general,Interval[{xmin,xmax}] represents an uncertain value which lies somewhere in the interval to.
Limit returns anInterval object, representing the range of possible values of near its essential singularity at:
The Wolfram Language can do arithmetic withInterval objects:
The Wolfram Language represents this limit symbolically in terms of anInterval object:
Some functions may have different limits at particular points, depending on the direction from which you approach those points. You can use theDirection option forLimit to specify the direction you want.
Limit[expr,x->x0,Direction->1]
find the limit asx approachesx0 from below
Limit[expr,x->x0,Direction->-1]
find the limit asx approachesx0 from above
Directional limits.
The function has a different limiting value at, depending on whether you approach from above or below:
Approaching from below gives a limiting value of:
Approaching from above gives a limiting value of:
Limit makes no assumptions about functions likef[x] about which it does not have definite knowledge. As a result,Limit remains unevaluated in most cases involving symbolic functions.
Limit has no definite knowledge aboutf, so it leaves this limit unevaluated:
Residues
Limit[expr,x->x0] tells you what the value ofexpr is whenx tends tox0. When this value is infinite, it is often useful instead to know theresidue ofexpr whenx equalsx0. The residue is given by the coefficient of in the power series expansion ofexpr about the pointx0.
Residue[expr,{x,x0}]
the residue ofexpr whenx equalsx0
Computing residues.
The residue here is equal to 1:
The residue here is zero:
Residues can be computed at the point at infinity:
Padé Approximation
The Padé approximation is a rational function that can be thought of as a generalization of a Taylor polynomial. A rational function is the ratio of polynomials. Because these functions only use the elementary arithmetic operations, they are very easy to evaluate numerically. The polynomial in the denominator allows you to approximate functions that have rational singularities.
PadeApproximant[f,{x,x0,{n,m}}]
give the Padé approximation to centered atx0 of order(n,m)
PadeApproximant[f,{x,x0,n}]
give the diagonal Padé approximation to centered atx0 of ordern
Padé approximations.
More precisely, a Padé approximation of order to an analytic function at a regular point or pole is the rational function where is a polynomial of degree, is a polynomial of degree, and the formal power series of about the point begins with the term. If is equal to, the approximation is called a diagonal Padé approximation of order.
Here is the Padé approximation of order to at:
This gives another Padé approximation of the same order:
The initial terms of this series vanish. This is the property that characterizes the Padé approximation:
This plots the difference between the approximation and the true function. Notice that the approximation is very good near the center of expansion, but the error increases rapidly as you move away:
In the Wolfram LanguagePadeApproximant is generalized to allow expansion about branch points.
This gives the diagonal Padé approximation of order to a generalized rational function at:
This gives the diagonal Padé approximation of order to the logarithm of a rational function at the branch point:
The series expansion of the function agrees with the diagonal Padé approximation up to order:
Top

[8]ページ先頭

©2009-2025 Movatter.jp