# Tag Info

0

Update thanks to comments fun = A^2 + A B + B^2 == (a^2 + a b + b^2) (c^2 + c d + c^2) Reduce[fun, #] & /@ {A, B} // MatrixForm

1

Rewriting your system for easier reading: Y = Array[y, 3]; T = Array[t, {3, 3}]; K = k*IdentityMatrix[3]; M = Transpose[{Y}].{Y} + T.Transpose[T] - K; r = Eliminate[M == Array[0 &, {3, 3}], Join[Y, First@T]] Variables[List @@ r] (* {k, t[2, 1], t[2, 2], t[2, 3], t[3, 1], t[3, 2], t[3, 3]} *)

1

I would not use functions. I would treat your equations as expressions and manipulate them: etharule = etha -> Exp[vLinf*(PL - Psat1)/(k*T) - N2L/N1L]; n1leqn = N1L == N1 - qc*(etha*Psat1*Vv[R]/(k*T)); n2eqn = N2L == N2/(1 + qc*PL*Vv[R]/((N1L*PL/KH)*k*T)); eqnsToSolve = {n2eqn, n1leqn} /. etharule; Now you can solve the equations for each value of ...

1

The solution is in terms of LambertW functions, called ProductLog in Mathematica. Hence to find all solutions, use an integer for each principal branch. So you get infinite solutions, one for each integer (except zero). sol = Reduce[1/a + b == 280 && 1/a E^(5 a) + b == 35, {a, b}]; sol = (sol /. C[1] -> #) & /@ Range[10]; NSolve[#, {a, b}] ...

1

sol = Solve[{x == -(1/3) + 4/3 Cos[1/3 Pi (-t1 - 2 t2)] Cos[1/3 Pi (-t1 + t2)] Cos[ 1/3 Pi (2 t1 + t2)], y == 4/3 Sin[1/3 Pi (-t1 - 2 t2)] Sin[1/3 Pi (-t1 + t2)] Sin[ 1/3 Pi (2 t1 + t2)]} // TrigToExp, {t1, t2}]; // AbsoluteTiming or {a == Cos[1/3 Pi (-t1 - 2 t2)] Cos[1/3 Pi (-t1 + t2)] Cos[1/3 Pi (2 t1 + t2)], b == Sin[1/3 Pi (-t1 ...

0

Why are your variable symbols single symbols, while your constants (a,b,c,..) split into real and imaginary parts? That's really the problem here. You really think Mathematica knows that you want (for example) the real part of the second equation to be b and the complex part to be c? You said the domain was Complexes which means it's considering b and c to ...

1

This is really totally normal. Your characteristic polynomial has coefficients ~10^(-10) and your solutions sometimes seem to evaluate to f(sol)= 10^(-20) instead of 0. The precision with which Mathematica will NSolve an equation may be different than the care it takes when you plug in various floating-point reals back into the function they might satisfy. ...

6

I am not getting the same results in version 10. Also I see no problem with the results already indicated, and I'll say a bit about that as we proceed. Here is what I obtain in version 10. smatrix = {{1 - 2.96392/u2, 0.0000196744/u2}, {1. - 2.96392/u2, -2.11737*10^-10 + 0.0000196746/u2}}; det = Det[smatrix]; sols = Solve[det == 0, u2] During ...

2

@Kellen Myers comment is useful. Since your coefficients are reals you have an approximate solution Whenever a number carries a decimal point as your solution output, it is an approximate real. 0.//Head (* out *) Real As mentioned in documentation center for Real you may change an approximate real number in an exact rational number by ...

4

You have a typo in your second equation. eqns = {2 + 2 a*d + 2 a*e == 0, 1 - 2 e + 2 d*b + 2 e*b == 0, 1 + 2 d*c + 2 e*c == 0, -2 + a^2 - 2 b + b^2 + c^2 == 0, -2 + a^2 + b^2 + c^2 == 0}; Solve[eqns, {a, b, c, d, e}] // Simplify

5

Oh, you just incorrectly type the equation in Mathematica, your second one should be: 1 - 2 d + 2 d b + 2 e b == 0, check the 2 d term. It's not a 2 b. Solve[{2 + 2 a d + 2 a e == 0, 1 - 2 d + 2 d b + 2 e b == 0, 1 + 2 d c + 2 e c == 0, a^2 + b^2 + c^2 - 2 == 2 b, a^2 + b^2 + c^2 - 2 == 0}, {a, b, c, d, e}] (* {{a -> -2 Sqrt[2/5], b -> 0, c ...

10

SetSystemOptions[ "ReduceOptions" -> {"DiscreteSolutionBound" -> 10000000}]; f[n_] := Module[{eqn}, eqn = (n1 + n3 + n5 == n2 + n4 + n6) && (n1 >= n2) && (n1 - n2 + n3 - n4 >= 0) && (n1 <= n) && (n1 - n2 + n3 <= n) && (n1 - n2 + n3 - n4 + n5 <= n) && (2 n <= n1 + ...

5

Use the method option Method -> {"IndexReduction" -> {Automatic, "ConstraintMethod" -> "Projection"}} This forces the equations to be incorporated as constraints. See tutorial/NDSolveDAE#128085219. Depending on the version, you might need to us Rationalize to make the coefficients exact to avoid 1/0 errors. (In general, I avoid machine ...

2

I would suggest: PayOffCall Select a limit large enough for your purposes: lim = 100.; Compute the values: v1 = {#, PayOffCall[#, 50, 2]} & /@ Range[lim]; Create an interpolating function: f = Interpolation[v1, InterpolationOrder -> 1]; Plot[f[x], {x, 1, lim}] We can evaluate f for arbitrary points {f[1.4], f[61.3]} {-2., 9.3} ...

9

Here is one way: Manipulate[Block[{t1, t2, v1, v2, pt, pts}, t1 = {xm, ym}; t2 = {xn, yn}; {v1, v2} = p; pt = {t1, t2} /. NSolve[{(t2 - v2).(t2 - t1) == 0, (t1 - v1).(t2 - t1) == 0, (t1 - v1).(t1 - v1) == r1^2, (t2 - v2).(t2 - v2) == r2^2}, {xm, ym, xn, yn}, Reals]; pts = Select[pt, Sign[(#[[1]] - v1).(#[[2]] - v2)] == 1 &]; ...

6

The current answer by Chip Hurst deals well with the case of solving for the roots of a (possibly) complex-valued function of a real variable, which NSolve struggles with. However, the more general case of finding roots of a complex-valued equation of a complex variable is a good bit more complicated, and it requires a stronger approach. One thing to note ...

1

here is an example using a prior solution as the starting value for the next step: polyn[x_?NumericQ, n_] := Normal@Series[ Sin[y], {y, 0, n}] /. y -> x sol[7] = x /. FindRoot[ polyn[x, 7], {x, 3}] Do[ sol[n] = x /. FindRoot[ polyn[x, n], {x, sol[n - 1]}], {n, 8, 20} ] DiscretePlot[sol[n] - Pi, {n, 7, 20}, PlotRange -> All]

1

This runs without errors. One definitely should not use the Head of an expression (e.g. f[[0]]) as a numeric variable in an array as the OP does, but I didn't want to rewrite everything. One normally uses f[[k+1]] to correspond to degree k and program the off-by-one indices throughout. Then the other Mathematica functions that work so efficiently on List ...

7

It seems me that the answers of mathe and Yves Klett do not meet expectations of the author. The latter is as much as I have got it, to have a short analytical expression for the solution. Probably the author has an intention to use the result further in some analytical calculations, or to do something comparable. Am I right? If yes, one should first of ...

6

Solve[L == (3 W)/2 + 3/2 Sqrt[4 A^2 Pi^2 + W^2] - Sqrt[ 6 A^2 Pi^2 + 3 W^2 + 5 W Sqrt[4 A^2 Pi^2 + W^2]]/Sqrt[2], W, Quartics -> False] or Solve[L == (3 W)/2 + 3/2 Sqrt[4 A^2 Pi^2 + W^2] - Sqrt[ 6 A^2 Pi^2 + 3 W^2 + 5 W Sqrt[4 A^2 Pi^2 + W^2]]/Sqrt[2], W, Reals]

2

One shotgun approach is to sic Simplify or FullSimplify onto your solution: sol1 = Solve[ L == (3 W)/2 + (3 Sqrt[4 A^2 Pi^2 + W^2])/2 - Sqrt[6 A^2 Pi^2 + 3 W^2 + 5 W Sqrt[4 A^2 Pi^2 + W^2]]/Sqrt[2], W]; sol2 = Simplify[sol1]; LeafCount /@ {sol1, sol2} ByteCount /@ {sol1, sol2} {3849, 3077} {111720, 92840} (Note: FullSimplify is still ...

2

The reasons for the change in the behavior of ParallelTable are subtle. The main source of the problem is that in funcB, the argument k_ is not protected with ?NumericQ like this: funcB[t_?NumericQ, k_?NumericQ] := (* a solution *) funcB[t, k] = Exp[NIntegrate[funcA[et, k], {et, tini, t}]] But more on that later. The problem does not appear in the ...

0

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

2

Here's another way (in M10 only): Cases[ NumberLinePlot[x1 >= 0 && -4*x1 <= 16 && 4*x1 >= 16 || x1 <= 0 && 4*x1 <= 16 && -4*x1 >= 16, x1], Point[{x_, _}] :> x, \[Infinity] ] (* {-4, 4} *)

2

I don't want to compete with Algohi's nice answer, but - as to my experience - Reduce can be almost always replaced with Simplify or FullSimplify: res = Simplify[x1 >= 0 && -4*x1 <= 16 && 4*x1 >= 16 || x1 <= 0 && 4*x1 <= 16 && -4*x1 >= 16] Cases[res, _?NumberQ, -1] {-4, 4}

4

Maybe something like this? I don't know if this is what you meant? sol=Reduce[x1 >= 0 &&-4*x1 <= 16 &&4*x1 >= 16 ||x1 <= 0 &&4*x1 <= 16 &&-4*x1 >= 16, {x1}]; sol[[1, 2]] (*-4*) sol[[2, 2]] (*4*)

2

There is a problem with boundary conditions. Changing them and fixing a few typos you can get: eq = {-f[x]^2 + f[x]^4 + x^4 Derivative[1][f][x]^2 + (x^3) /(-1 + x) f[x] ((1 - 2 x) f'[x] - (-1 + x) x f''[x]) == 0, f[1/10] == 1, f'[1/10] == -1/10}; eq // Column // TraditionalForm s = NDSolve[eq, f, {x, 1/10, 9/10}]; Plot[Evaluate[f[x] /. ...

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

added some numeric interval limits for y Clear@"`*" eqn2[w_, x_, y_, z_] := 3*z'[y] == 2 (z[y] - 1) + (1 - y^2 w) x eqn3 = eqn2[1, 1, y, z] sol = NDSolve[{eqn3, z[0] == 1}, z[y], {y, 1, 5} (*added interval*)] Plot[Evaluate[z[y] /. sol], {y, 1, 5}, PlotRange -> All] z3 = z[y] /. sol /. y -> 3

3

With the slightly modified input pde1 = 3*D[z[w, x, y], y] == 2 (z[w, x, y] - 1) + (1 - y^2 w) x soln1 = z[w, x, y] /. First@DSolve[pde1, z[w, x, y], {w, x, y}] soln5 = soln1 /. {x -> 0} eqn1 = soln5 == 2.7*soln1 and a replacement of the integration constant ContourPlot[ x /. Solve[eqn1 /. {C[1][w, 0] -> 1, C[1][w, x] -> 1}, x, Method -> ...

4

eqn1[w_, x_, y_, z_] := 3 x y'[x] - 2 z^2 + 3 w y[x] == 5 x eqn2 = eqn1[1, x, y, 2] sol = NDSolve[{eqn2, y[1] == 2}, y, {x, 1, 2}] Then, to get x when y[x] is 3: Solve[(y[x] /. sol) == 3, x] {{x -> 1.556466}} OR as suggested by Mr.Wizard, you can use FindRoot FindRoot[(y[x] /. sol) == 3, {x, 1}] {x -> 1.556466}

1

Replacing your last three lines by: eqn1[w_, Te_, Pprobe_, t_] := Cv*Te'[t] == (Cv - y[Te[t], w])*5 y[Te[t], w]*Pprobe eqn2 = eqn1[3*10^9, Te, 10^-15, t] sol = NDSolve[{eqn2, Te[0] == 0}, Te[t], {t, 0, 10}] Plot[Evaluate[Te[t] /. sol], {t, 0, 10}, PlotRange -> All] gives: My machine doesn't return a result for the DSolve[] after a few seconds, so I ...

0

The problem is that you use $Te$ as a variable and as a function in the same time this cause that it appears without argument in the differential equation.

0

Attacking the problem numerically gives a first insight into the solution n(a/b) The parameters are defined as m = 1; Dx = 100; ν = 0.25; b = 1; λ1 = Sqrt[(((m^2)*(π^2))/a^2) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]]; λ2 = Sqrt[(-(((m^2)*(π^2))/a^2)) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]]; ω1 = ((λ1^2) - ν*((m^2) + (π^2))/a^2); ω2 = ((λ1^2) - ν*((m^2) + ...

2

You are getting no answers at all. Lets get you some answers quickly, by giving up going to Infinity first. In[1]:= j = 8; NMinimize[ Norm[3/2 Sum[k^(5/2) E^-((B+H/2)k) Integrate[x^2 E^(3/2 H x^2 k), {x, 0, 1}], {k, 1, j}]/ Sum[k^(5/2) E^-((B+H/2)k) Integrate[E^(3/2 H x^2 k), {x, 0, 1}], {k, 1, j}]-1/2-H]+ Norm[ Sum[k^(3/2) E^-((B + H/2) k) ...

2

I have to post a separate answer because my approach in this one is very different from my other answer's. It is based largely on the method that Frank Kampus used here to solve a sudoku, using Backtrack from the Combinatorica package in one method, and Outer/Select in the other method. Warning: it's a long answer. I managed to solve the puzzle but only ...

2

Below is my (unsuccessful) attempt at solving the problem. I think this is an interesting problem that the MMA experts on here could help solve, and in the process will hopefully reveal the capabilities of MMA. 1) I borrowed from the answer in the linked Q&A the fact that the total of all elements in the matrix will be 468. This means that the row ...

1

Quantity["Speed of Light"] == QuantityVariable[\[Nu], "Frequency"] (2 \[Pi])/ QuantityVariable[k, "wavenumber"] /. QuantityVariable[\[Nu], "Frequency"] -> Quantity[2, "THz"] // Solve[#, QuantityVariable[k, "wavenumber"]][[1]] & {QuantityVariable[k,"wavenumber"] -> Quantity[(2000000000000 [Pi])/149896229, 1/("Meters")]} % // N ...

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 + ...

5

As @b.gatessucks said in the comments, there are two issues with your code. First, you'll need to define z as a function with SetDelayed, and also add in ComplexExpand: z[x_, y_] := ComplexExpand @ Abs[((1/3 x + I y) - 2 x)/(I y + 1/x)]; z[x,y] Sqrt[(25 x^2)/9 + y^2] / Sqrt[x^-2 + y^2] Additionally, ContourPlot holds its arguments (i.e. it doesn't ...

0

I believe that you have to split the derivative into two parts (real + imaginary) and then make the corresponding contour plots like this z[x_, y_] := Abs[((1/3 x + I y) - 2 x)/(I y + 1/x)]; dx[x_, y_] := D[z[x, y], x] real = Re[ComplexExpand[dx[x, y]]]; img = Im[ComplexExpand[dx[x, y]]]; ContourPlot[real, {x, -2, 2}, {y, -2, 2}, PlotPoints -> 50] ...

5

What have you tried so far? You can use Solve to solve for θ. Solve[a1 Sin[2θ] + a2 Sin[2ϕ] + a3 Cos[2θ] + a4 Cos[2ϕ] == a5, θ] /. _C -> 0 Since your equation have periods π, you can just let ϕ run between 0 and π, and add arbitrary multiples of π to the solutions. Another way You can plot it using ContourPlot. I used bounds 0 < θ < π and 0 ...

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 + ...

Top 50 recent answers are included