Hot answers tagged symbolic
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
The * multiplication operator is rendered in InputForm:
c = a*b;
c // InputForm
a*b
For producing/exporting strings:
ExportString[c, "Text"]
ToString[c, InputForm]
"a*b"
"a*b"
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_] := ...
5
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
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
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 ...
Only top voted, non community-wiki answers of a minimum length are eligible


