New answers tagged

0

If you solve for the second derivatives, you won't have to use "EquationSimplification" -> "Residual" and things will work ok. Solving for the second derivatives be faster if you start with exact coefficients. Also, if you clear l, solve for the derivatives, and then substitute a value for l, Solve won't choke on the algebra. The long time it takes is ...


2

Use Simplify with Assuming: m = {{E^(I*β1 + I*β3) Cos[β2], E^(I β1 - I*β3) Sin[β2]}, {(-E^((-I) β1 + I*β3)) Sin[β2], E^((-I) β1 - I*β3)*Cos[β2]}}; MatrixForm[ Assuming[{β1, β2, β3} ∈ Reals, Simplify@ConjugateTranspose[m]]] $$\left( \begin{array}{cc} e^{i \text{$\beta $1}+i \text{$\beta $3}} \cos (\text{$\beta $2}) & e^{i \text{$\...


1

I find that getting the answer I want with this type of expression requires the use of a range of techniques. In this case, I would use ComplexExpand[Conjugate[a/b + c/d], {a, d}, TargetFunctions -> Conjugate] giving Conjugate[a]/b + c/Conjugate[d]


2

Thanks Young for the answers, The problem was simple , there was a slight modification in the equation, which is give below i[f_] := A - (x y - 4 (f - f0)^2)/(4 (f - f0)^2 + y^2); r[f_] := B + (2*(f - f0) (x + y))/((4 (f - f0)^2 + y^2)); and as Evans mentioned, the Parametric plot will be the following


1

This is an illustrated comment to Young's answer, but you can plot in the Re/Im plane using the following: Show[ ListPlot[ Transpose@{Last /@ da1, Last /@ da2} , Joined -> True , AxesLabel -> {"Re", "Im"} ] , ParametricPlot[ {nlm[1, f], nlm[2, f]} , {f, Min@(First /@ da1), Max@(First /@ da1)} , PlotStyle -> Red ] , PlotRange -&...


4

Updated with new model equations from OP Simultaneous NonlinearModelFit[] da1 = Transpose[{data[[All, 1]], data[[All, 2]]*Cos[data[[All, 3]]]}]; da2 = Transpose[{data[[All, 1]], (data[[All, 2]]*Sin[data[[All, 3]]])}]; r[f_] := A - (x y - 4 (f - f0)^2)/(4 (f - f0)^2 + y^2); i[f_] := B + (2*(f - f0) (x + y))/((4 (f - f0)^2 + y^2)); Clear[A, B, x, y, f, f0, ...


1

Here is how to do the contour integral. Shown for some specific parameters. A = 1; B = -1/2; a = 1; f[z_] := (E^(-a z))/(A + B (Cosh[z])) Integrate[f[rz - I Pi], {rz, Infinity, 0}] + Integrate[f[z], {z, -I Pi, I Pi}] + Integrate[f[rz + I Pi], {rz, 0, Infinity}] // Simplify 4/3 I (-3 + 2 Sqrt[3]) Pi You will need to add appropriate assumptions to ...


0

Thanks to J.M. and Szabolcs for addressing my questions clearly. Here's what they came up with: I was using Dynamic incorrectly, wrapping variables that weren't being displayed. The new code is now this InitA = { {PopupMenu[Dynamic[a11re], Range[-5,5]] + PopupMenu[Dynamic[a11im], Range[-5,5]] Style["i", Italic], PopupMenu[Dynamic[a12re], Range[-5,5]] +...


8

Just avoid the branch cut: Refine[Sqrt[Exp[I p]], π > p > 0] (* ==> E^((I p)/2) *) The branch cut of the square-root function doesn't allow Mathematica to simplify the expression without the restriction on p from above. See also the related question and answer here: Using Solve to solve the equation x1/3=−1


0

I have found yet another way to solve this. Based on J.M.'s answer and another post on defining the derivative of Abs for Real valued functions (will look it up later to add here). The following code works: Derivative[1][Abs][x_] := Re[ Conjugate[x] D[x, s] ]/Abs[x]/D[x, s]; Plot[D[Abs[k[s]], s] /. k -> kf /. s -> ss, {ss, 0, 1}] It is worth ...


1

I. A summary for the failing trial Residue can't calculate the residue of u directly. (It's hard to tell whether it's a bug or not, Residue never promises he will calculate every known residue, anyway.) SeriesCoefficient won't give desired answer in the following case: SeriesCoefficient[u, {s, 0, -1}] If it gave the desired answer, we would be able ...


2

Alternatively, you could do a little complex number algebra for the purpose: kf = NDSolveValue[{I k'[s] == 20 (s k[s] - (1 - s) (1 - k[s]) (1 + k[s])), k[0] == 1/2}, k, {s, 0, 1}]; Plot[{10 Abs[kf[t]], Re[kf[t] Conjugate[kf'[t]]]/Abs[kf[t]]}, {t, 0, 1}, PlotLegends -> {"scaled function", "numerical derivative"}]


3

Using an undocumented function: Cosh[Sqrt[-a^2 - b^2]] /. Sqrt[expr_] /; Internal`SyntacticNegativeQ[expr] :> I Sqrt[-expr] Cos[Sqrt[a^2 + b^2]]


3

In these cases, you need to specify the variables are $>0$. Of course it also works for $<0$, but it just works this way in the software. FullSimplify[Cosh[Sqrt[-a^2 - b^2]], {a > 0, b > 0}] Cos[Sqrt[a^2 + b^2]] FullSimplify[Sqrt[-a^2 - b^2], {a > 0, b > 0}] I Sqrt[a^2 + b^2]


3

You could try using numerical differentiation from the Numerical Calculus package: Clear[r, fun] Needs["NumericalCalculus`"] r = NDSolve[ {I k'[s] == 20 (s k[s] - (1 - s) (1 - k[s]) (1 + k[s])), k[0] == 1/2}, k, {s, 0, 1} ]; fun[s_] := Abs[(k /. r[[1]])[s]]; Plot[ {10 fun[t], ND[fun[s], s, t, Terms -> 20]}, {t, 0, 1}, PlotLegends -&...


1

The key idea of this solution is to partly simplify the expression by direct substitution of some known terms rather than using functions for simplification like Simplify. First, take out the imaginary part of the expression and observe: impart = E^(I ω t) Γ[I ω] + E^(-I ω t) Γ[-I ω] // Im // ComplexExpand Hmm… seems that there're many Arg terms in ...


5

First of all you shouldn't (if possible) use approximate numbers working with symbolic functionality like a very sophisticated function Reduce. Before seeking the set of your interest try to envisage the region: RegionPlot[ Abs[1/(1 + I/Sqrt[x + I y])] < 1/2, {x, -1.1, 0.5}, {y, -0.6, 1.0}] Now we can see what we are to find, i.e. ...


2

You are expecting too much of Reduce in this case, as sigma[ms, ArcTan[0.9], ArcTan[0.1], -2.0, 10, zz, 10] depends on ms in a quite complicated way. Therefore you should not expect Reduce to be able to give a symbolic rule for when the inequality is satisfied. However, we can use numerics to try to find approximate regions where the inequalities hold. ...


2

I think that the imaginary component is a rounding error. Try N[exp, 40] and the imaginary part is returned as zero. ADDED If evaluated to sufficient significant figures, we see that the expressions given above all have an imaginary part indistinguishable from zero. N[exp // Simplify, 40] N[exp // ExpandAll, 40] N[exp // ExpToTrig, 100] N[exp // ...


1

ComplexExpand with TargetFunctions -> Abs help us to solve this integral. f[t_] := Sqrt[Exp[I*t]^2 - 1]; complex = ComplexExpand[f[t], TargetFunctions -> Abs] Sqrt[Abs[-1 + E^(2 I t)]] Cos[1/2 (-I Log[-1 + E^(2 I t)] + I Log[Abs[-1 + E^(2 I t)]])] + I Sqrt[Abs[-1 + E^(2 I t)]] Sin[1/2 (-I Log[-1 + E^(2 I t)] + I Log[Abs[-1 + E^(2 I ...


5

People dealing with special functions for the first time ask questions like this a lot; I suppose it's time to write something on this topic. Let's go back to a much simpler case of the polylogarithm: $$\mathrm{Li}_1(x)=\sum_{k=1}^\infty\frac{x^k}{k}=-\log(1-x)$$ Following your train of thought, $\mathrm{Li}_1\left(\frac{11}{10}\right)$ should also be ...


7

I am assuming that this not just (#2&) as the color function. Here are various ways: f[x_, y_] := Cos[x + I y]; g[x_, y_] := Re@f[x, y]; h[x_, y_] := Im@f[x, y]; scp = SliceContourPlot3D[ h[x, y] - z, {z == g[x, y], z == -2}, {x, -2 Pi, 2 Pi}, {y, -2, 2}, {z, -2, 2}, Contours -> 10, ColorFunction -> "Rainbow", BoxRatios -> ...


0

As it says on page 66 of the book you are quoting, figure[14] is the modular surface of $h(z)$. That concept was defined of page 56. To reproduce figure[14], you simply have to make a 3D plot of the modular surface and adjust it's display form by giving the proper options. The following should get you going. h[x_, y_] := With[{z = x + I y}, Abs[1/(1 + z^2)]]...



Top 50 recent answers are included