Tag Info

Hot answers tagged

20

The standard built-in logarithm function is defined for complex variables as follows: Log[z] = Log[Abs[z]] + I Arg[z] The location of the branch cut is simply caused by the convention that polar angles of z are assumed to be in the range $-\pi$ to $\pi$. This same branch cut is also part of the definition of the built-in Arg function. Here is a different ...


19

@whuber gave me another idea : first change the summand to an exponential and then do the sums using the symmetry. Integrate[Exp[-t i j k (i + j + k + 1)], {t, 0, Infinity}, Assumptions -> {i > 0, j > 0, k > 0}] (* 1/(i j k (1 + i + j + k)) *) so we need to do the sums of the exponential and then integrate at the end. Now we can make a change ...


17

In this case you can use SeriesCoefficient SeriesCoefficient[Exp[x], {x, 0, n}]


16

If you're new to Mathematica, then it might make sense to explore these kinds of basic things via the natural language interface. Assuming that you're connected to the internet, so Mathematica can access WolframAlpha's servers, just type = power series sinx Note that the equals sign will be reformatted to look like it's part of the WolframAlpha input ...


16

It's true that the multivariable version of Series can't be used for your purpose, but it's still pretty straightforward to get the desired order by introducing a dummy variable t as follows: Normal[Series[f[(x - x0) t + x0, (y - y0) t + y0], {t, 0, 2}]] /. t -> 1 $(x-\text{x0}) (y-\text{y0}) f^{(1,1)}(\text{x0},\text{y0})+\frac{1}{2} ...


15

(Edited; original at the end) Gram-Schmidt orthogonalization provides an answer. Let's use a running example to illustrate. It begins even before the Chebyshev polynomials, with their domain--the interval $[-1,1]$--and the kernel for which they are orthogonal: limits = {-1, 1}; k[x_] := 2/Sqrt[1 - x^2]/Pi; The Chebyshev polynomials are obtained by ...


15

You want first to fix any typographical errors (such as the unbalanced parentheses) and it's also wise to avoid symbol names beginning with capital letters. Then, to obtain a series expansion in powers of $1/z$, expand the expression around infinity, not zero: Series[a + b (1 - Exp[-t/(b c)]/(z - Exp[-t/(b c)])) , {z, Infinity, 5}] $(a+b)-\frac{b ...


12

Is InverseSeries what you are looking for? InverseSeries[Series[ArcTan[Log[1 + x]/(1 + x)], {x, 0, 5}]] (* x+(3 x^2)/2+3 x^3+(149 x^4)/24+(68 x^5)/5+O[x]^6 *) EDIT: looks reasonable: Plot[{ pl[x], invs }, {x, -.3, .3}, PlotStyle -> {{Dashed, Black}, Red} ] Who knows what the radius of convergence is, though.


11

Try this Normal@Series[expr/.{f->x f, g->x^2 g, h->x^3 h},{x,0,4}] /.x->1


10

After you define your function execute this line: Series[f, {x, \[Infinity], 1}] // Normal // PowerExpand Following your $x \gg a$ we can rewrite it as % /. (-a + x) -> x // FullSimplify which gives: Now you have to be very careful dealing with derivative. It is not enough to keep 0th and 1st terms (as you did) - you will loose information. ...


10

Here is another variant along the same lines as @whuber proposed. Consider function $$ f(x,y,z,t)=\sum _{i=1}^{\infty } \sum _{j=1}^{\infty } \sum _{k=1}^{\infty } x^{i-1} y^{j-1} z^{k-1} t^{i+j+k}. $$ Mma gives f[x_, y_, z_, t_] = Sum[x^(i - 1) y^(j - 1) z^(k - 1) t^(i + j + k), {i, 1, \[Infinity]}, {j, 1, \[Infinity]}, {k, 1, \[Infinity]}] $$ ...


10

This method of developing a truncated solution can be done as below. I illustrate with an example that DSolve does not seem much to like. ode = x''[t] - t*x'[t] + Sin[t] == 0; initconds = {x'[0] == 1, x[0] == 0}; We create a differentail operator to create this ode. odeOperator = D[#, {t, 2}] - t*D[#, t] + Sin[t] &; Now set up our Taylor series as ...


10

Let's look at the InputForm of your expression: expr = 3.4235 + (4.22 - 5.2342 I) a + 7.543 a^6 + O[a]^7; InputForm[expr] SeriesData[a, 0, {3.4235, 4.22 - 5.2342*I, 0, 0, 0, 0, 7.543}, 0, 7, 1] You want to set all the coefficients to one, so let's do that with Unitize: MapAt[Unitize, expr, 3] 1 + a + a^6 + O[a]^7 Or, if you prefer, as a Rule: ...


10

The fastest way to do this is to note that for any function $f$ with a convergent power series, the quasi-hyperbolic function $$g(x)=\frac{f(ix)-f(-ix)}{2i}$$ has the power series of $f$ with only odd, alternating sign terms (provided that it converges). Here's an example: f[x_] := x + x^2 + x^3 - x^4; (f[I x] - f[-I x])/(2 I) // Simplify which produces ...


9

Here's an attempt: multiTaylor[f_, {vars_?VectorQ, pt_?VectorQ, n_Integer?NonNegative}] := Sum[Nest[(vars - pt).# &, (D[f, {vars, k}] /. Thread[vars -> pt]), k]/k!, {k, 0, n}, Method -> "Procedural"] multiTaylor[f[x, y], {{x, y}, {0, 0}, 2}] f[0, 0] + y*Derivative[0, 1][f][0, 0] + x*Derivative[1, ...


9

Be explicit and do it in two steps. The first step is just the series computation with the matrix expression M+S replaced by a single variable: f = Series[(1 + t x)^(-1), {t, 0, 3}] $1-x t+x^2 t^2-x^3 t^3+O[t]^4$ We need to describe how to expand powers of x. This can be done recursively: power[a_, n_Integer] /; n > 1 := Distribute[a . power[a, ...


9

There is a new function as of version 9 : Series[MatrixFunction[(1 - a*(#))^(-1) &, bigM + bigS], {a, 0, 3}] While the output does not look very pretty it will behave correctly.


9

The Hermite polynomials are orthogonal with respect to the inner product $$\langle f,g \rangle = \int_{-\infty}^{\infty} f(x)g(x)e^{-x^2} \, dx.$$ Thus, the nth coefficient can be computed using the inner product of your polynomial with the nth normalized Hermite polynomial. Example: p[x_] = 1 + x + x^2 + x^3; coeffs = Table[ Integrate[HermiteH[n, ...


9

Had InverseSeries[] not been a built-in function, one option might be to invert the Carleman matrix corresponding to the function: CarlemanMatrix[f_, {x_, x0_, {m_Integer, n_Integer}}] := Prepend[Table[ If[k == 0, Function[x, f][x0]^j, BellY[Table[{FactorialPower[j, i] Which[#2 == 0, 1, #1 == 0, 0, True, #1^#2] &[Function[x, f][x0], j - ...


9

@Artes's use of Coefficient certainly seems the most straightforward and probably the best for small examples. If the polynomials have very many terms, the use of SeriesData to represent the polynomials will give better performance. The multiplication of series is efficient in Mathematica. One should note that it is truncated beyond the maximum degree ...


8

For polynomials, you don't need to do any integrals to find the expansion. Take a polynomial p and a list basis containing the basis functions. Then define a function that takes these two, identifies the variable x, and solves for the coefficients in basis that make the two polynomials equal in terms of their CoefficientLists: expandPoly[p_, basis_, x_] := ...


8

The problem is that the real part of the argument in the Gamma functions is not recognized as being real. The only thing you have to do in order to circumvent this problem is to give a name to the quantity that appears as the real part and specify explicitly that it is real. Here I do this: Simplify[ Assuming[ y ∈ Reals && m ∈ Reals && q ...


8

There is a straightforward answer analogous to that in Maple : Coefficient[ Sum[t^i, {i, 5}] Sum[t^i, {i, 2, 6}] Sum[t^i, {i, 3, 9}], t, 15] 19 This can be verified by expanding the polynomial: Expand[ Sum[t^i, {i, 5}] Sum[t^i, {i, 2, 6}] Sum[t^i, {i, 3, 9}]] However you can do it in many different ways e.g. by exploiting CoefficientRules or ...


8

Series Expansion Answering the question we show how to construct the series expansion of f[x] about x=0. From the basic equation we find f'[x]==2(Log[a x + b]-Log[Cosh[f[x]]]) the derivative of f[x] in terms of the function f[x] itself and some other terms. Hence in the Taylor expansion of the function f[x] = f[0] + x f'[0] + x^2/2! f''[0] + x^3/3! ...


7

Method I (1) Take series at infinity to get a (Laurent) polynomial. (2) Find largest exponent. (3) Find corresponding coefficient. mainTerm[expr_, x_] := Module[ {approxpoly, prec = 1, j = 0, expon, coef}, approxpoly = Normal[Series[expr, {x, Infinity, prec}]]; While[approxpoly === 0 && j <= 5, j++; prec = 2*prec + j; approxpoly ...


7

There are options in Series (Analytic, Assumptions) which you might exploit. Nonetheless let's use a bit more straightforward approach, simply change the variable y (y -> z x) and then back z -> y/x: Series[(x + y)^(1/2) /. y -> z x, {z, 0, 5}] /. z -> y/x // Quiet // TraditionalForm Edit Since the question has been edited we should add a ...


7

In Mathematica 10 you can use SeriesCoefficient and Inactive to get what you require Inactive[Sum][SeriesCoefficient[2/(3(x-1)^3),{x,0,n},Assumptions->n>=0]x^n,{n,0,\[Infinity]}] where Inactive prevents Sum from evaluating. You can then "activate" the Sum as follows Activate[%] to get back to your original expression.


7

FindSequenceFunction and FindGeneratingFunction can do this. They won't immediately work every time. This is what I did: First notice that if we find $f(x)$ for $k=1$ then the solution for arbitrary $k$ is just $k \,f(kx)$. Then, write the coefficients into a list ... coeffs = {0, 1/6, 0, -1/120, 0, 1/5040, 0, -1/362880, 0, 1/39916800} ... and try ...


7

You can use b.gatessucks idea to make it analytically: f[t_] = Exp[z - 1/z] /. z -> E^(I t) // FullSimplify then integrate: 1/(2 Pi) Integrate[E^(I t) f[t], {t, 0, 2 Pi}] (* -BesselJ[1, 2] *)


7

With some functions, a series expansion with explicit powers in the polynomial is not possible. For example, the expansion of $x^a$ around $0$ is just $x^a$ where the power depends on (is equal to) $a$. (If $a$ is not a nonnegative integer then it's not analytic.) If we were to expand it not around $0$ but around $1$ it would be possible to get an explicit ...



Only top voted, non community-wiki answers of a minimum length are eligible