Tag Info

Hot answers tagged

9

You can use Defer to see how to properly enter your "summation" type notation. Defer[1 + Sum[Sum[1/((k + 2) k!), {k, n, Infinity}], {n, 0, Infinity}]] You can then enter that output to see that it works. You must've entered something different.


9

You need to specify assumptions: In[1]:= FunctionExpand[StirlingS2[n, 10], n > 0 && Mod[n, 1] == 0] Out[1]= -(1/362880) + 2^(-8 + n)/315 + 1/135 2^(-7 + 2 n) + 1/315 2^(-8 + 3 n) - 3^(-3 + n)/1120 + 1/5 2^(-7 + n) 3^(-3 + n) - 5^(-2 + n)/576 + 1/567 2^(-8 + n) 5^(-2 + n) - 7^(-1 + n)/4320 - 9^(-2 + n)/4480


8

FullSimplify[(-1)^n*BesselJ[n, z] - BesselJ[-n, z], n ∈ Integers, ComplexityFunction -> (StringLength @ ToString @ # &)] Also: ComplexityFunction -> (Count[#, _BesselJ | _Power, {-2}] &) ComplexityFunction -> (Count[#, _?NumberQ, Infinity] &)


6

Here's another way to proceed, using Derivative[], and sidestepping the use of a dummy variable: LogDerivative[f_] := Derivative[1][Composition[Log, f]] Test: LogDerivative[Sin][x] Cot[x] LogDerivative[Gamma][x] PolyGamma[0, x] LogDerivative[#^3 &][x] 3/x


6

Your operator must depend on both function and variable - in analogy to D function: logD[f_, x_] := D[f, x]/f or an alternative definition: logD[f_, x_] := D[Log[f], x] Of course your variables of differentiation and in the function must agree. Test it: logD[f[x], x] Derivative[1][f][x]/f[x] logD[Sin[x], x] Cot[x] f = x^2; logD[f, x] ...


5

We have, for all integer a and n Sum[Fibonacci[n + i], {i, 0, a}] == Fibonacci[n + a + 2] - Fibonacci[n + 1] (-> True) This can be seen by evaluating Table[ Sum[Fibonacci[n + i], {i, 0, a}] == Fibonacci[n + a + 2] - Fibonacci[n + 1], {a, 1, 10}, {n, 1, 10} ] which gives a bunch of True's. You can then simply do n = 1000; fibRatio[a_, b_] := ...


4

There is another approach that sometimes works better (gives closed-form expressions rather than recurrence relations): In[1]:= InverseFourierTransform[(-I k)^n FourierTransform[1/(1 + x^2)^Log[2], x, k] , k, x] Out[1]= (2^(-1 + n - 1/2 Log[1/x^2]) Abs[x]^-Log[2] ((-I)^ n ((1 + n) x Gamma[(1 + n)/2] Gamma[ n/2 + Log[2]] ...


4

Let f = (Sin[x^2] + Sin[y^2])/(x - y) be the function in question. As pointed out in the answers to this question, finding multivariable limits automatically computationally is full of pitfalls. The idea behind the function lim in this answer was to use Maximum and Minimum to find bounds on the function and apply the squeeze theorem. It fails here ...


3

Well, Mathematica gives you the correct answer to your input. You first specify that x should be replaced by 0 and afterwards the limit of y->0 should be calculated. The correct answer to that is 0. And yes, this is exactly the same as taking the limit x->0 first and taking the limit y->0 afterwards. If the double limit exists it is the same as taking the ...


2

For completeness, I'll just add the textbook definition of the $n$-th root of a complex variable: root[x_, n_, branch_: 1] := Simplify[Power[Abs[x], 1/n] Exp[I (Arg[x]/n + 2 Pi (branch - 1)/n)]] root[1, 2, 2] (* ==> -1 *) Here, x is an arbitrary complex number, n is the power of the the equation $z^n = x$ we're trying to solve, and branch is the ...


2

While Mathematica follows the conventional philosophy about inverses of functions that are not one-to-one, it does provide tools for dealing with other approaches. If Solve is too cumbersome, one can write one's own versions: root[n_Integer, expr_] := expr^(1/n) ((-1)^(2/n))^Range[0, n - 1]; root[n_Integer, Power[expr_, m_Integer]] /; Divisible[m, n] := ...


2

The following example is written for Mathematica 9, and will NOT be compatible with previous versions. According to your question, this looks like some kind of homework, so I'd show a slightly different example, just to demonstrate how to index variables (by one of many possible ways), and how to use some features of NDSolve that may be helpful for chasing ...


2

If you enter it this way Limit[(Sin[x]^2 + Sin[y]^2)/(x - y), {x -> y}] (* Output: {DirectedInfinity[…]} *) or alternatively you can try Limit[(Sin[x]^2 + Sin[y]^2)/(x - y) /. x -> y, y -> 0] (* Output: ComplexInfinity *) In your input, you have used ReplaceAll, /., to first Replace all x's with zero, after which you find the limit as y -> 0. ...


2

As we should expect the following identity (maybe under some certain mathematical assumptions, I'm not sure): $$\sum _i \sum _j f(i,j)=\sum _i \left(\sum _j f(i,j)\right)\;\text{,}$$ which we can confirm in Mathematica 9 by the examples say: However, the nested-iterator version of the summation in the original question takes forever time in my ...


2

I think it's because in the sigma form the two sums are treated as a double sum with different order as the expression case: In==> $$ \text{Hold}[\sum _{n=0}^{\infty } \sum _{k=n}^{\infty } \frac{1}{(k+2) k!}]//\text{InputForm} $$ Out==> Hold[Sum[1/((k + 2)*k!), {n, 0, Infinity}, {k, n, Infinity}]] and according to the documentation, the sum for n will ...


2

If this really can be expressed linearly, then expressing in Matrix form is going to be the easiest thing and the best from a computational perspective. For example, with your definitions: R6 = kf*(z[1] + mu*z[5]) - 2*z[6] + mu*kd^2*z[7] - kd^2*z[6]; R7 = kf*(z[1] + mu*z[6] - 2*z[7]) + kd^2*z[8] + kd^2*z[7]; R8 = kf*z[1] + (mu*z[7] - 2*z[8]) + kd^2*z[9] + ...


1

Maybe another way to look at it is to change variables : subs = {x -> Sqrt[a + b], y -> Sqrt[a - b]}; expr = FullSimplify[(Sin[x^2] + Sin[y^2])/(x - y) /. subs] (* -((2 Cos[b] Sin[a])/(Sqrt[a - b] - Sqrt[a + b])) *) This should make the path dependence of the limit a bit more explicit : Limit[expr, a -> b] (* (Sqrt[2] Cos[b] Sin[b])/Sqrt[b] *)


1

Does this do the job? poly=(kz py + py + kr kx) variables = Variables[poly]; reprule =DeleteCases[If[StringTake[ToString[#], 1] == "k", # -> Subscript[StringTake[ToString[#], 1], StringTake[ToString[#], {2, -1}]]] & /@ variables, Null] poly/.reprule This will take all the variables in an expression, work out if they are a combination of k ...


1

could anyone explain why my code fails? Namely, why does Mathematica think that raptor[[i]] is a scalar valued function even though its initial condition is clearly vector valued. raptor[[i]] is a scalar valued element of something which you wish to be a vector valued object. You haven't told Mathematica that it is a vector. Whenever you call ...


1

The observations I made I got from messing around with Unevaluated, Trace, Hold and FullForm. My intuition was that we could make get the same behavior of Sqrt for numbers as for Symbols using Unevaluated. However, there is a a rule for Sqrt[anything] that must look like this HoldPattern[Sqrt[anything_]]:> Power[anything, Rational[1,2]] So an ...



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