Tag Info

New answers tagged

3

The differential equation, its initial condition, and its boundary conditions are translationally invariant in space. Consequently, the solution must be independent of x and y. Indeed, solving the equations as given in the Question does give a spatially constant solution that oscillates in time. For instance, DensityPlot[Evaluate[Re[A[x, y, 10000]] /. ...


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


3

New way The OP mentioned ContourPlot but its behavior is V10 makes my original solution practically unusable except for a very rough plot. Another approach is to solve the equation for all the roots in a given region. From the ContourPlot, one can see there are two types, ones that cross y == -5 and ones that cross y == 5. We can use NDSolve to solve the ...


2

Here's working code with corrected syntax n = L = 8; sigma = 3; mu = 0.0; leftREAL = Table[RandomVariate[ NormalDistribution[mu, Exp[-(2*Pi*k*sigma/L)^2]]], {k, n/2}]; rightREAL = Reverse[leftREAL] /. {x_, y_} -> {n - x, y}; fullREAL = Join[{0.0}, Most[leftREAL], rightREAL] leftIMAGINARY = Table[RandomVariate[ NormalDistribution[mu, ...


3

Perhaps I'm missing something, but why not do Most[leftREAL] + I leftIMAGINARY rightREAL + I rightIMAGINARY These could then be put into a single array if desired. Alternatively Flatten[fullREAL + I fullIMAGINARY] // MatrixForm Note that I have preemptively removed MatrixForm from the "full..." assignments and only applied it at the end as it ...


4

You need to tell M that all symbols are real: expr = (1 + (x + I*y)/2 + (x + I*y)^2/12)/(1 - (x + I*y)/ 2 + (x + I*y)^2/12); ComplexExpand@ Abs @expr


1

This has been fixed in 10.1 code Exp[2 I u x] /. Exp[Complex[0, a_] u x] :> a Exp[2 I u Sin[x]] /. Exp[Complex[0, a_] u Sin[x]] :> a foo[2 I u Sin[x]] /. foo[Complex[0, _] u Sin[x]] :> bar foo[2 I u Sin[x]] /. foo[Complex[0, _] (p : u) Sin[x]] :> bar foo[2 I u Sin[x]] /. foo[Complex[0, _] HoldPattern[u] Sin[x]] :> bar


1

This has been fixed in 10.1 on windows: $Version code for the above expr1 = Log[-m^2 - I eta]; Limit[expr1, eta -> 0, Assumptions -> m^2 > 0] expr2 = Log[-m^2 + I eta]; Limit[expr2, eta -> 0, Assumptions -> m^2 > 0] a + expr1; Limit[%, eta -> 0, Assumptions -> m^2 > 0] a + expr2; Limit[%, eta -> 0, Assumptions ...



Top 50 recent answers are included