# Tag Info

20

A first step would be to implement a convenience function that can automatically apply the method of separation of variables to separable types of equations. To show that the steps could in principle be automated, let me repeat basically the same calculation that I did for cylindrical coordinates with only slight modifications to the heat equation: ...

19

One way is to use an extra argument that acts as a switch. Clear[f]; f[0] = 1; f[1] = 1; f[n_, True] := f[n - 1] + f[n - 2] Example: f7 = f[7, True] (* Out[329]= f[5] + f[6] *) To proceed another step, can do a replacement. f7 /. f[aa_] :> f[aa, True] (* Out[330]= f[3] + 2 f[4] + f[5] *) Can use Nest to repeat this n times. Nest[# /. f[aa_] ...

18

After all this time I came up with a very nice tensor calculus proof of the Hairy Ball Theorem. It only depends on Stokes theorem and standard laws of tensor calculus like the Ricci identity and symmetries of curvature tensors. All the topology is done by Stokes theorem. The remainder of the proof is equational, local and geometrical. It is coordinate/basis ...

18

Usage: dChange[expresion, {transformations}, {oldVars}, {newVars}, {functions}] You can also skip {} if a list has only one element. (Update) Examples: 0. wave equation in retarded/advanced coordinates dChange[ D[u[x, t], {t, 2}] == c^2 D[u[x, t], {x, 2}], {a == x + c t, r == x - c t}, {x, t}, {a, r}, {u[x, t]} ] c Derivative[1, 1][u][a, r] == ...

15

Here is extensions to @Jens answer (I think) also relying on possible separation of variable. I is not meant as an independent answer, but complements it. First extend his answer to 2D ClearAll[pt, px, x, t, p]; operator = Function[p, D[p, t] - Δ D[p, x, x] - Δ D[p, y, y]]; ansatz = pt[t] px[x] py[y]; pde2 = Expand[Apply[Subtract, ...

15

Having experienced similar problematic issues with Mathematica I instantly thought that expanding the fraction in the integrand i.e. applying Appart could resolve the problem, and indeed it does: Integrate[ Apart[(1 - x)(1 + 2x)^6/Sqrt[1 - x^2]], {x, -1, 1}]/Pi 15 These arguments apply to this case as well Bug in mathematica analytic integration? i.e. ...

13

This is not an answer (yet). Rather it explores the question in more depth. n = 8; parameters = ConstantArray[{0, 1}, n]; variables = Symbol /@ CharacterRange["a", FromCharacterCode[ToCharacterCode["a"] + n - 1]]; The following takes a long time to evaluate, but the results it produces reveal give us a better view of the problem with Probability. ...

13

Disclaimer: This is not a full answer, but perhaps it's a start. From an algebraic stand point this seems like a very hard problem. I attacked it with a more brute force approach. I guess a basis and use LatticeReduce to try to find a Diophantine relation. Note this code only tries to identify roots as the product of integral powers of trig. If it returns ...

13

It seems to me that Denominator helps a lot: fractionQ = Denominator@# =!= 1 &; fractionQ /@ {a/b, 1/a, 1/5, b/2, a, .5} (* {True, True, True, True, False, False} *)

10

$$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big) = \frac{\mu ^m (2 \lambda +\mu )}{2^{m+1} (\lambda +\mu )^{m+1}}$$ Observing: d1 = TransformedDistribution[ a + s, {a \[Distributed] ExponentialDistribution[λ], s \[Distributed] ExponentialDistribution[μ]}] (* ...

10

As far as I know, there is no easy, general way to handle this kind of algebra with Sum expressions. What follows is an attempt to use replacement rules to handle a wider range of cases than chris's example. I don't consider it to be the canonical answer that is required, but perhaps someone might be able to use it as a starting point. I use Inactive on ...

8

Let's define the function f suitably: f[x_, a_, b_] := Log[x, 1 + (x^a - 1)*(x^b - 1)/(x - 1)] We would have defined f with appropriate conditions (I recommend to examine this post: Placement of Condition /; expressions), e.g. f[x_, a_, b_] /; 0 < a < 1 && 0 < b < 1 && x > 0 := ... however since we are to deal with ...

8

expr = x^2 D[u[x, y], {x, 2}] - D[u[x, y], {y, 2}] + D[u[x, y], y] \$Assumptions = {s > 0, t > 0} expr /. u -> (u[# Exp[#2], # Exp[-#2]] &) /. {x -> Sqrt[s t], y -> Log[Sqrt[s/t]]} // Simplify Second set of replacement rules is from: Eliminate[s == x Exp[y] && t == x ...

8

The goal is not so clear for me, but probably something like this can be useful: test = MatchQ[#, HoldPattern[_. _^-1] | _Rational | HoldPattern[_ Rational[1, _]] ] & test /@ {a/b, 1/a, 1/5, a, .5, b/2} {True, True, True, False, False, True} Notice the dot in _., it is crucial for detecting 1/a since there is no Times really.

7

Here is a trick that allows you to get exactly what you're looking for: FourierTransform[ InverseFourierTransform[ x/y DiracDelta[x - y], x, k], k, x] DiracDelta[x - y] What I did here is to apply the Fourier transform and its inverse, which is of course the identity and therefore is equivalent to the original expression. But in doing so, ...

7

To have w2 expressed in terms of w1, w1 cannot be assigned a value. If it is assigned a value then Mathematica will always substitute that value for w1. Consequently "define" w1 with an equation: Clear[w1]; eq = w1 == (a + b)/c^2; w2 = (a^3 + 3 a^2 b + 3 a b^2 + b^3)/c^6; w2 /. Solve[eq, a][[1]] // Simplify w1^3 However, in this case at least, you ...

7

we can see why this happens with a change of variable: Integrate[bhw Sin[(bhw s)/bh]/((-1 + E^bhw) (bhw^2 + bh^2 gamma^2)), {bhw, -Infinity, Infinity}, Assumptions -> {s >= 0, gamma > 0, bh > 0}] (same result ) Now change the one instance of bh to a new parameter: Integrate[bhw Sin[(bhw s)/bh1]/((-1 + E^bhw) (bhw^2 + bh^2 ...

7

If we are willing to confine ourselves to functions like the example f which: is defined using DownValues only, and has no special attributes such as HoldAll, etc. ... then the following lifting function might be useful: ClearAll[stepper] SetAttributes[stepper, HoldAll] stepper[f_Symbol] := Module[{rules, g} , rules = Rule @@@ ...

7

Good question; the notion of a tensorial (covariant) derivative is something that is missing in Mathematica AFAIK. I can think of two ways to proceed: Option 1 One way is to overload the TensorRank, TensorDimensions, and TensorSymmetry functions for patterns that have head CD: CD /: TensorRank[CD[tensor_]] := TensorRank[tensor] + 1 CD /: ...

7

You don't need to use TagSetDelayed for the definition of the derivative because Derivative doesn't have attribute Protected. I'll extend add the derivative definition to arbitrary order n: ClearAll[ln]; Derivative[n_, 0][ln][x_, a_] := Derivative[n][Log][x] ln[x_, a_?NumericQ] := Piecewise[{{Log[x], Re[a] > 0}, {-Log[1/x], True}}] ln[x, -1/2] ...

7

Yes we can ! MapAt[Integrate[#, {x, -Infinity, Infinity}] &, f[x], 1] // PowerExpand (* n *) tt = f[x]^2 /. Power[Sum[a__, b__], 2] :> sum[a (a /. i -> j) // Release, b, b /. {i -> j}] MapAt[Integrate[#, {x, -Infinity, Infinity}] &, tt, 1] /. sum -> Sum // PowerExpand

6

It is not quite clear, what do you you want to get out of the answer. Would you like to compare Maple and Mma and understand, which one is better ? Or would you like to understand the alternative forms of taking this integral? Or the reason, why the results of Marple and Mma are different? Or transform the Mma result in terms of xand y? Or, ...

6

In Version 10, once the points have been obtained as per user21's approach, we can tetrahedralize them directly using DelaunayMesh pf = {Cos[u], Sin[u] + Cos[v], Sin[v]}; pp = ParametricPlot3D[pf, {u, 0, 2 Pi}, {v, -Pi, Pi}] data = Reap[ParametricPlot3D[Sow[pf], {u, 0, 2 Pi}, {v, -Pi, Pi}]][[2, 1]]; pts = Cases[data, {_?NumericQ, _?NumericQ, ...

6

Here is another way that uses the Graphics object directly: gr = ParametricPlot3D[{Cos[u], Sin[u] + Cos[v], Sin[v]}, {u, 0, 2 Pi}, {v, -Pi, Pi}] We discretize the graphics using DiscretizeGraphics mr = DiscretizeGraphics[Normal[gr /. (Lighting -> _) :> Lighting -> Automatic]] We compute the convex hull hull = ...

6

Let me start addressing the Green function part of the question. Lets define a Heat equation and its generic solution (see above) operator[p_] := D[p, t] - D[Δ D[p, x], x]; sol = Heat[Δ, -Infinity] and build a general solution via superposition as: sol1 = Integrate[(sol /. x -> x - y) g[y], {y, -Infinity, Infinity}] Plot[sol1 /. g -> ...

6

I think this does what you want: Less @@ SortBy[Defer[Subscript[ω, #]] & /@ {1, 2, 11, 22}, N @@ # &]

6

If I understand the goal of the question correctly, this is a possible application for the new Inactivate and Activate. Looking in particular at the documentation for Inactive, under "Applications," you'll find many situations that look similar to the one in this question. For example, you can enter a valid expression in the form Inactivate[(x y)^2] ...

6

This is not a full answer, just a start towards a solution. The culprit is Dispatch, which became atomic in version 10, and comparison wasn't implemented for it. Here's a small test in version 9: In[1]:= a = Dispatch[{"a" -> 1, "b" -> 2, "c" -> 3, "d" -> 4, "e" -> 5, "f" -> 6, "g" -> 7, "h" -> 8, "i" -> 9, "j" -> 10, ...

6

UnitConvert[Quantity[3, "PlanckConstant"], "ReducedPlanckConstant"] /. x_?NumericQ :> RootApproximant[x/Pi]*Pi Quantity[6*Pi, "ReducedPlanckConstant"]

5

Following @BobHanlon's suggestion to use Equal instead of Set, you can also use Eliminate: Eliminate[{w1 == (a + b)/c^2, w2 == (a^3 + 3 a^2 b + 3 a b^2 + b^3)/c^6}, {a, b, c}] (* w2 == w1^3 *)

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