Tag Info

Hot answers tagged

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 ...


18

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 ...


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 ...


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 ...


14

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} ...


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

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: ...


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 - ...


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

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 ...


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 ...


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

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 ...


6

The inner product for the Hermite polynomials, $$\langle f, g\rangle \int_{-\infty}^{\infty} f(x)\,g(x)\,e^{-x^2}\;dx\,,$$ has nice formulas for power functions (where $n=a+b$) and for the Hermite polynomials: $$ \begin{align} \langle x^a, x^b \rangle = \langle x^n, 1\rangle &= \frac{1}{2} \left((-1)^n+1\right)\, \Gamma \left(\frac{n+1}{2}\right)\cr ...


6

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, ...


6

One slick way to compute the coefficients $c_k$ in the Laurent series $$f(z)=\sum_{k\in\mathbb Z} c_k (z-a)^k$$ is to recognize that the problem of computing them is equivalent to the problem of computing Fourier coefficients, if you take the contour $\gamma$ in the definition for Laurent coefficients, $$c_k=\frac1{2\pi i} \oint_\gamma \frac{f(z)\,\mathrm ...


6

f[r_] := 3^(1/3)*Exp[-2*r/3]/Pi^(2/3) - (2*Pi)^(1/3)* Exp[2*r/3]/(5*(3*Pi^(1/3)*Exp[2*r/3]* ArcSin[2*(2*Pi)^(1/3)*Exp[2*r/3]]/(5*2^(2/3)) + 1)) In this case you might just observe that there is a commonly appearing expression Exp[2*r/3]. Substitute in a enw variable and expand a series at infinity in both variables. Then replace the substituted ...


6

If I take the challenge to be to get Mathematica to do the sum in the form given (as distinct from applying some mathematics insightfully), then here is a way to get the answer. The only trick I use is to break the triple sum into a double and single sum. s2 = Sum[1/(i j (i + j + k + 1)), {i, 1, Infinity}, {j, 1, Infinity}]; // Timing (s2 = ...


6

Per J.M.s suggestion, the solution to the problem is: e = .65; Ec[M_] = M + Sum[(1/2^(n - 1)* Sum[((-1)^k*(n - 2*k)^(n - 1))/((n - k)!*k!)* Sin[(n - 2*k)*M], {k, 0, Floor[n/2]}])*e^n, {n, 1, 10}]; ParametricPlot[{Ec[M], M}, {M, 0, 2 \[Pi]}, PlotRange -> {{0, 2 \[Pi]}, {0, 2 \[Pi]}}, GridLines -> Automatic, PlotStyle -> Red] ...



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