# Power x^y

gives to the power .

# Details • Mathematical function, suitable for both symbolic and numerical manipulation.
• Exact rational number results are given when possible for roots of the form .
• For complex numbers and , Power gives the principal value of . »
• is automatically converted to only if is an integer.
• is automatically converted to only if is an integer.
• For certain special arguments, Power automatically evaluates to exact values.
• Power can be evaluated to arbitrary numerical precision.
• Power automatically threads over lists.
• Power[x,y] has a branch cut discontinuity for noninteger running from to 0 in the complex plane.
• Power[x,y,z,] is taken to be Power[x,Power[y,z,]].

# Background & Context

• Power is a mathematical function that raises an expression to a given power. The expression Power[x,y] is commonly represented using the shorthand syntax x^y or written in 2D typeset form as xy. A number to the first power is equal to itself ( ), and 1 to any complex power is equal to 1 ( ). The inverse of a power function is given by Log, so solving the equation for gives a principal solution of .
• The operation of taking an expression to the second power is known as squaring and the operation of taking an expression to the third power is known as cubing. The rules for combining quantities containing powers are called the exponent laws, and the process of raising a base to a given power is known as exponentiation. Many expressions involving Power, Exp, Log, and related functions are automatically simplified or else may be simplified using Simplify or FullSimplify. PowerExpand can be used to do formal expansion and associated simplification, and ExpToTrig can be used to get trigonometric forms of Power expressions.
• The function Sqrt[x] is represented using Power[x,1/2]. Exponentiation using the base of the natural logarithm E can be input as Exp[x] but is represented using Power[E,x].
• Power[x,y] has a branch cut discontinuity for y running from to 0 in the complex x plane for noninteger y. Because of this branch cut, Power[x,1/n] returns a complex root by default instead of the real one for negative real x and odd positive n. To obtain a real-valued n root, Surd[x,n] can be used. The special case CubeRoot[x] corresponds to Surd[x,3].

# Examples

open allclose all

## Basic Examples(6)

Evaluate numerically:

Enter as a superscript using :

Explicit FullForm:

Plot over a subset of the reals:

Plot over a subset of the complexes:

Asymptotic expansion at a singular point:

## Scope(38)

### Numerical Evaluation(7)

Evaluate numerically:

Evaluate to high precision:

Efficiently compute the first million digits of a result:

Complex numbers are generated when necessary:

The principal root is always used:

Surd can be used to get the real root:

Complex number inputs:

Power can deal with realvalued intervals:

Power threads elementwise over lists and matrices:

### Specific Values(4)

Values at zero:

Depending on the real part of , the result can be 0 or infinity:

Hence the following is indeterminate:

Limiting values at infinity:

Evaluate symbolically:

Find a value of x for which the Power[x,3]=0.5:

Visualize the result:

### Visualization(5)

Plot the function over the reals for several integers n:

Plot the real and imaginary parts of over the reals:

Compare the real and imaginary parts of (Power[x, ]) and (CubeRoot[x]) over the reals:

Plot the real part of :

Plot the imaginary part of :

Polar plot with :

### Function Properties(5) is defined for all real when :

It is only defined for integer when :

For nonzero complex , it is an entire function of :

Function range of :

Power is right-associative:

The form on the right-hand side is the preferred form:

Power is periodic in its second argument in the complex plane:

Find limits at branch cuts:

### Differentiation(4)

First derivative with respect to x:

Higher derivatives with respect to x:

Plot the higher derivatives with respect to x:

Formula for the  derivative with respect to x:

Derivative with respect to its second argument:

The  derivative:

### Integration(3)

Compute the indefinite integral using Integrate:

Verify the anti-derivative:

Definite integral:

More integrals:

### Series Expansions(4)

Find the Taylor expansion using Series:

Plots of the first three approximations around :

General term in the series expansion using SeriesCoefficient:

The first-order Fourier series:

Taylor expansion at a generic point:

### Function Identities and Simplifications(6)

Primary definition:

Euler's formula:

Connection with Exp function:

Nested powers are not always automatically combined:

Use PowerExpand to force cancellation:

This can produce incorrect results:

Alternatively, use Simplify with appropriate assumptions:

Products are automatically combined:

Expand assuming real variables x and y:

## Applications(3)

5% compound interest:

Find the radius of a sphere of the same volume as a cube with side :

Contour plot of a complex inverse power:

## Properties & Relations(25)

Equivalent forms for square roots:

Whole powers of roots are automatically simplified:

Roots of powers cannot be automatically simplified:

Simplify with assumptions:

Use PowerExpand to do formal simplification:

Get results valid for all complex :

Use ExpToTrig to get trigonometric forms:

Reduce to single roots:

Use Solve or Root to find all roots:

Use Expand to expand out powers of polynomials:

Powers are automatically applied to series:

Equations involving powers can have infinitely many solutions: Reciprocals, square roots, etc. are automatically converted to powers:

Exponentials are converted to powers:

Match powers of :

Include the case :

Branch cut structure for fractional powers in the complex plane:

Test whether powers are algebraic:

Integrals:

Integral transforms:

Sums:

Differential equations:

Power appears in special cases of many mathematical functions:

Power can be represented as a DifferenceRoot:

General term in the series expansion of Power:

The generating function for Power:

FindSequenceFunction can recognize the Power sequence:

The exponential generating function for Power:

## Possible Issues(13)

Power always computes principal roots:

Powers are not generically inverses of roots:

With approximate numbers, imaginary parts can be generated:

Use Chop to remove the small imaginary part:

The branch cut makes this function discontinuous:

Its derivative nevertheless generically gives 0:

Machine precision can give incorrect numerical results on the branch cut:

Machine-number inputs can give arbitrary-precision results:

Powers can be very large:

Some powers are too large for any computer: Powers can give indeterminate expressions: The precision of each result is determined by the precision of the zero:

Symbolic powers of 1 are only evaluated when the 1 is an exact or machine-precision number:

Numerical decision procedures with default settings cannot simplify this power:    Higher internal precision resolves the result: Nonrational powers are not absorbed into series:

Power applies elementwise to matrices:

Use MatrixPower for matrix powers:

## Neat Examples(3)

Plot successive powers:

Generate successive power towers:

Contour plot of the argument of such a tower:

Magnitudes of power towers of :

Find the limit:

Solve for the limit: 