Tag Info

New answers tagged

3

The linear system is easily solved generally by first calulating the MatrixExp. Then we can extract the real and imaginary parts. Here we go The complex matrix A = {{0, 1}, {-2, -I}}; The matrix exp At = MatrixExp[t A] (* {{1/3 (2 Cos[t] + Cos[2 t] + I (2 Sin[t] - Sin[2 t])), 1/3 (I (-Cos[t] + Cos[2 t]) + Sin[t] + Sin[2 t])}, {1/ 3 (2 I (Cos[t] ...


5

Almost a dozen alternatives with timings: ClearAll[f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11]; f1[w_] := w /. {a_, Complex[_, b_]} :> {a, b}; f2[w_] := {#, Im@#2} & @@@ w; (* my favorite ... credit: ubpdqn *) f3[w_] := w /. Complex[_, b_] :> b; f4[w_] := MapAt[Im, w, {{All, -1}}]; f5[w_] := Module[{s = Im /@ w}, s[[All, 1]] = w[[All, 1]]; s]; ...


3

w = { {0.01, 99 + 0.00001414 I}, {0.15, 6.6370108 + 0.003144129 I}, {0.25, 3.9515722 + 0.00854493297 I}, {6, 0.10041 + 0.28132187 I} }; res = Replace[w, {x_, complex_} :> {x, Im @ complex}, {1}] {{0.01, 0.00001414}, {0.15, 0.00314413}, {0.25, 0.00854493}, {6, 0.281322}} ListLogPlot[res, PlotTheme -> "Detailed"]


1

Sorry, this is too long for a comment, but I thought it might help! Update I also tried, interestingly, c = Table[Exp[-t (1 + 256 I Pi )], {t, 0, 1, 1/30000}]; // AbsoluteTiming (* 0.109373 seconds *) d = Table[Exp[t (-1 - 256 I Pi )], {t, 0, 1, 1/30000}]; // AbsoluteTiming (* 0.140624 seconds *) Though this method in fact produces a slightly different ...


1

How about using NSolve like this. As you know z roots are 2-sets. but I have tried the one of things. eqn[x_, y_, z_] := z^2 + 3 z + x^2 + y^2 == 0 opts := Sequence[ PlotLegends -> Automatic, Exclusions -> {x^2 + y^2 == 9/4}, ExclusionsStyle -> Red, ColorFunction -> "SunsetColors"]; rec = ContourPlot[ Re[z] /. NSolve[eqn[x, y, ...


0

Solve[{(1-I)/Sqrt[2]==Exp[I alpha] Tan[beta],0<beta<Pi,0<alpha<2Pi}//ComplexExpand, {alpha,beta},Method->Reduce]


1

Just to add a couple of more observations to Nasser's. Case 6 As Daniel Lichtblau hints at in a comment, if we use an exact 37/10 in place of the approximate 3.7, we get an exact result with a zero imaginary component: Integrate[PDF[NormalDistribution[14, 37/10], x], {x, 15, Infinity}] N@% (* 1/2 Erfc[(5 Sqrt[2])/37] 0.393476 *) Case 7 Such a small ...


4

You may use the following: Reduce[(1 - I)/Sqrt[2] == ExpToTrig[Exp[I alpha]]*Tan[beta] && 0 < beta < Pi && 0 < alpha < 2 Pi]; {ToRules[%]} // FullSimplify {{alpha -> (7 π)/4, beta -> π/4}, {alpha -> (3 π)/4, beta -> (3 π)/4}} Although I'm not sure why it doesn't work without the ExpToTrig[] thing


2

In Mathematica 10.0: MandelbrotSetPlot[{-2 - I, 1 + I}] (Admittedly, this doesn't address what's wrong with the code in the original question, but if you just want to get a Mandelbrot set plot, surely a built-in function is likely to be reasonably efficient.)


1

Given the equation : eqns = {(300 (1920 + 8 x - 21 y) (-80 + y))/(7 (30 + x)^3) + (2025 (208 x + 5 (-3446 + y)))/(52 (90 + y)^2) + (300 (4500 + 80 x - 21 z) (-100 + z))/(7 (30 + x)^3) - (1521 (15425 - 539 x + 50 z))/(539 (39 + z)^2) == 0, -((300 (1920 + 8 x - 21 y))/(7 (30 + x)^2)) - (2025 (-85 + x) (208 x + 5 (-3446 + ...


1

The question states two conditions that are to be satisfied by the number sought: The imaginary part is the least negative value in the list The real part is positive. Note that the number sought is not the one with the least negative imaginary part among the numbers in the list that have a positive real part. It is the one that has the least ...


0

Given: SeedRandom[0] c = RandomComplex[{-1 - I, 1 + I}, 20]; We can slightly refine m0nhawk's method by using MinimalBy: MinimalBy[Select[c, Re[#] > 0 && Im[#] < 0 &], Abs @* Im] {0.809571 - 0.134575 I} Or in operator form: c // Select[Re[#] > 0 && Im[#] < 0 &] // MinimalBy[Abs @* Im] {0.809571 - 0.134575 I} ...


2

Setting expr equal to the OP's expression, the equations are given by Flatten@expr == 0. expr = {{(300 (1920+8 x-21 y) (-80+y))/(7 (30+x)^3)+(2025 (208 x+5 (-3446+y)))/(52 (90+y)^2)+(300 (4500+80 x-21 z) (-100+z))/(7 (30+x)^3)-(1521 (15425-539 x+50 z))/(539 (39+z)^2)},{-((300 (1920+8 x-21 y))/(7 (30+x)^2))-(2025 (-85+x) (208 x+5 (-3446+y)))/(52 ...


2

Version 9. Specifying a domain may speed things up or may greatly slow things down. Cases[N[Solve[{...}, {x,y,z}], 30], {x->_Real, y->_Real, z->_Real}] Result in 28 seconds. N[Solve[{...}, {x,y,z}, Reals], 30] Stopped it after 6 hours with no result.


4

eqns = {(300 (1920 + 8 x - 21 y) (-80 + y))/(7 (30 + x)^3) + (2025 (208 x + 5 (-3446 + y)))/(52 (90 + y)^2) + (300 (4500 + 80 x - 21 z) (-100 + z))/(7 (30 + x)^3) - (1521 (15425 - 539 x + 50 z))/(539 (39 + z)^2) == 0, -((300 (1920 + 8 x - 21 y))/(7 (30 + x)^2)) - (2025 (-85 + x) (208 x + 5 (-3446 + ...


2

Rather complex one: first Select, then SortBy and pick the first one. SortBy[Select[c, Re[#] > 0 && Im[#] < 0 &], Abs[Im[#]] &][[1]]



Top 50 recent answers are included