Tag Info

New answers tagged

3

Everything is as it should be. In the first instance, you want a separate rule for each element of the list. For that, you can use Thread: Subscript[Ε, si] = {Ex, Ey, Ez}; Subscript[B, si] = {Bx, By, Bz}; Subscript[S, si] = 1/Subscript[μ, 0] (Subscript[Ε, si]* Subscript[B, si]); Subscript[S, si] /. Thread[Subscript[B, si] -> Subscript[B, si]/c] ...


2

A conditional definition (using /;, that is) is not the same thing as a "Limit with assumptions", so far as Mathematica is concerned. To achieve that one does e.g. Limit[...,Assumptions->...]. To un derstand why, notice that, as written, blah4[Sin[x]] does not evaluate. So Limit can do nothing with it. For your example, below is a form that Mathematica ...


0

You want the RegionFunction parameter. This should be a raw Function object that returns True in the region that you do want plotted. Examples: VectorPlot[{x/Sqrt[x^2 + y^2], y/Sqrt[x^2 + y^2]}, {x, -5, 5}, {y, -5, 5}, RegionFunction -> Function[{x, y}, x^2 + y^2 > (0.1)^2]] VectorPlot[{x/Sqrt[x^2 + y^2], y/Sqrt[x^2 + y^2]}, {x, -5, 5}, {y, -5, ...


1

The best way about this, using again the spherical harmonics, is this: Define a symbol for the complex conjugate, e.g. Ybar Simplify the expression for the spherical harmonic: Y[l_, m_, θ_, ϕ_] := SphericalHarmonicY[l, m, θ, ϕ] Define Ybar Ybar[l_, m_, θ_, ϕ_] := SphericalHarmonicY[l, m, θ, ϕ] /. I -> -I And that's it


2

Patterned assumptions seem to need to match the ConditionalExpression's condition exactly to work out for some cases. The ∈ Reals-assumptions do work as you gave them, while the inequality Subscript[s,_]>0 does not, but observe the different behavior of Subscript[s,_]>=0: Evaluating without any assumptions first: f = 1/\[Sqrt](2 \[Pi] Subscript[s, ...


1

The document never promises that pattern-matching is supported inside Assumptions. (Though in some cases it does seem to be!) So the only stable way I can think of is as following: Subscript[g, i_][x_] := ($Assumptions = Union[$Assumptions~Join~ {{Subscript[m, i], Subscript[s, i]} ∈ Reals, Subscript[s, i] > 0}]; Exp[-((x - Subscript[m, ...


4

Although Daniel pointed correctly out that problems related to Integrate have been the subject of many discussion here, I found it worthwhile to study this case in detail, because a condition including Mod was not discussed up to now, as far as I know. The aim is to find out if there is a bug, and if so, where exactly it is sitting, and/or, if possible, to ...


0

Here comes a simple solution, perhaps. The two cases characterize the usage well. expr = Sqrt[f[y[qq], z]^2] + Sqrt[DD[2, 3, 4]^2] + (f[1, 2] > 0); FullSimplify[expr, Thread[Cases[expr, x_[___] /; ! ValueQ[x], Infinity] > 0]] FullSimplify[expr, Thread[Cases[expr, f[___] /; ! ValueQ[f], Infinity] > 0]] Out[94]= True + DD[2, 3, 4] + f[y[qq], z] ...


1

This might be what you want: myfullsimplify[expr_, assum_] := Module[ {pat, tmp, seq}, pat = FirstCase[Level[assum, Infinity], p[_]] /. p[x_] -> x; tmp = FirstCase[Level[expr, Infinity], pat]; seq = {expr, assum} /. {pat -> #, p[_] -> #}; FullSimplify @@ seq /. # -> tmp ] It's used as follows: myfullsimplify[entry[1, 2, 3] < 0, ...



Top 50 recent answers are included