# Tag Info

## Hot answers tagged equation-solving

8

Similar question: How can I simulate this toggle mechanism? {z1 = 15, z2 = 139/50, z3 = 1001/50, z4 = 12, z5 = 1001/50, z6 = 12}; {a0x = 0, a0y = 0, b0x = -z1, b0y = 0}; newsys = {ax == z2 Cos[t], ay == z2 Sin[t], (-ax + bx)^2 + (-ay + by)^2 == z3^2, (-b0x + bx)^2 + (-b0y + by)^2 == z4^2, (-b0x + ex)^2 + (-b0y + ey)^2 == z6^2, (-ax + ex)^2 + ...

5

It is hard to figure out what you really need. If you describe the surrounding application you may get better answers. You should avoid using capital letters to start user Symbols in Mathematica as this may conflict with internals. If I follow your updated question I believe you want this: fn[x_, y_] := Min @ Quotient[{x, y}, {2, 1}] Test: fn[2, 1] ...

5

What you have is basically a nonlinear second order recursion, and in this case it can be solved by: sol = RSolve[-k x f[x] + k (x + 1) f[x + 1] - r f[x] + r f[x - 1] == 0, f[x], x] The answer is fairly large, and besides having variables r and k, it also has two constants C[1] and C[2], so there may be enough flexibility to enforce your desired ...

4

You need to understand how to define a function and how replacement rules work. This is a nice start point. f[c_, d_, z_] := c + d z s = Solve[{f[c, d, 1] == 2, f[c, d, -1] == 1}, {c, d}] (* {{c -> 3/2, d -> 1/2}} *) Print["c=", c /. s[[1]], " d=", d /. s[[1]]] (* c=3/2 d=1/2 *)

4

These equations are solvable, but the process is exceptionally slow and the output huge. To help Solve, replace the approximate real numbers 1. and 2. by 1 and 2. Then, solve the nine linear equations in terms of p and the parameters. nine = Simplify[Solve[{eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq9, eq10}, {Ly, Lq, LA, gA, gB, r, g1, g2, g3}][[1]]]; ...

4

You've encountered floating-point roundoff error. Note the combination of very large and very small numbers in eq4. Let's try something different. I'll evaluate just your integrals, without the numbers: v1[t_] = Integrate[a, t] + v10 v2[t_] = Integrate[a, t] + v20 x1[t_] = Integrate[v1[t], t] + h x2[t_] = Integrate[v2[t], t] + h Now we'll just Solve ...

4

You can use ToRules to convert the output to a list of rules. From the documentation: ToRules takes logical combinations of equations, in the form generated by Roots and Reduce, and converts them to lists of rules, of the form produced by Solve. Example: roots = Roots[x^2 + 1 == 0, x] (* x == I || x == -I *) ToRules[roots] (* Sequence[{x -> I}, ...

4

I'm on 10.0 for Mac OS X x86 (64-bit) (December 4, 2014), just use Backsubstitution -> True while using Reduce, Solve[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals] $\left\{\left\{a\to -3,b\to -\frac{1}{3}\right\},\{a\to 1,b\to 1\},\left\{a\to 2,b\to \frac{1}{2}\right\}\right\}$ Reduce[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, ...

4

eq1 = (1 + E^b)/(1 + E^(9/10 a + b)) == 95/100; a0 = a /. Solve[eq1, a] /. C[1] -> 0 f[b1_, x_] := (1 + E^b1)/(1 + E^(x a0 + b1)) /. b -> b1 Quiet@FindRoot[NIntegrate[f[b, x], {x, 0, Infinity}] == 1, {b, -20}] (* {b -> -29.4444} *)

4

You can find the family of parameters with Reduce. For example f[x_] := x^5 + a x^4 + b N@Reduce[f[x] == x && f'[x] == 1 && 0 < a < 1, {x, a, b}, Reals] Here x acts as an arbitrary parameter with certain restrictions.

3

If the output is as shown you can use ToRules: Reduce[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals]; {ToRules[%]} {{a -> -3, b -> 1/6 (7 - a^2)}, {a -> 1, b -> 1/6 (7 - a^2)}, {a -> 2, b -> 1/6 (7 - a^2)}} If you are attempting to find many solutions you may need to increase the System Option ...

3

[Udpate: simplified DirichletCondition, omitted unnecessary Method specification.] Following the Transient PDE examples in Finite Element Programming, I came up with this: Ω = ImplicitRegion[(x + y <= 10), {{x, 0, 10}, {y, 0, 10}}]; Dif = 0.0000072; eq1 = D[u[t, x, y], t] == Dif*Laplacian[u[t, x, y], {x, y}] - 1.2; sol = NDSolve[{eq1, ...

3

The tutorial "ExplicitRungeKutta" Method for NDSolve shows how to get the built-in coefficients for the the default 2(1) embedded pair: NDSolveEmbeddedExplicitRungeKuttaCoefficients[2, Infinity] (* {{{1}, {1/2, 1/2}}, {1/2, 1/2, 0}, {1, 1}, {-(1/2), 2/3, -(1/6)}} *) The general syntax for a given method, order, and precision appears to be ...

3

I'm not sure if this is solvable. However, there appears to be one and only one solution (assuming you want real values for X and T), available by the following kludgy means: First, solve the individual equations for T: s1 = Solve[-(8.314)*T*Log[X] == 8.3*(1400 - T), T] s2 = Solve[-(8.314)*T*Log[1 - X] == 8.3*(1200 - T), T] giving {{T -> 11620./(8.3 ...

3

Given that U*V = f[r], one can invert the function f locally about a center, r == center in terms of a power series with Normal @ InverseSeries @ Series[f[r], {r, center, orderOfApproximation}] /. r -> U*V This yields a truncated power series (polynomial) that approximates InverseFunction[f][U*V]. For instance, Block[{α = 0.13, Q = 0.5^2, M = 1, R = ...

3

FindInstance works as well: fi = FindInstance[(x^2 + y^2 - 4) == 0 && (y - x^2 + 2 x - 1) == 0, {x, y}, Reals, 2] // N {* {x -> -0.399864, y -> 1.95962}, {x -> 1.85894, y -> 0.737785} *} ContourPlot[(x^2 + y^2 - 4)*(y - x^2 + 2 x - 1) == 0, {x, -4, 4}, {y, -4, 4}, ContourStyle -> {Thick, Blue}, GridLines -> Automatic, ...

3

Using this great post of J.M. which defines FindAllCrossings2D f[x_, y_] := (x^2 + y^2 - 4) g[x_, y_] := (y - x^2 + 2 x - 1) pts = FindAllCrossings2D[{f[x, y], g[x, y]}, {x, -7/2, 4}, {y, -9/5, 21/5}, Method -> {"Newton", "StepControl" -> "LineSearch"}, PlotPoints -> 85, WorkingPrecision -> 20] // Chop; pl=ContourPlot[{f[x, y], g[x, ...

3

The problem with arbitary rot, mentioned in a comment by the OP, is that the equations contain terms like (1 - 3 Cos[π/6 + rot]^2) Cos[qx Cos[π/6 + rot] + qy Sin[π/6 + rot]] That rot appears inside Cos simply as well as inside Sin and Cos which are themselves inside a Cos, and that there are several such terms, makes this a difficult equation to solve ...

3

Update notice 2: Found starting initial conditions that work in V10. Update notice: bbgodfrey pointed out that the built-in shooting method does not work in V10.0.1 (nor V10.0.2). Set up the shooting method by hand, so you can control the convergence. The problem is that small changes in the initial conditions cause the solutions to blow up before r ...

2

Use Reduce. In fact, with your definitions of fqReal and fqImag, the command red = Reduce[ fqReal == 0 && fqImag == 0 && -Pi <= qx <= Pi && -Pi <= qy <= Pi, {qx, qy}] gives \$\left(\text{qx}==-\frac{4 ...

2

In addition to @belisarius' solution, you might want to look at StringForm Clear[f] f[c_, d_, z_] = c + d z; (* either Set or SetDelayed works *) s = Solve[{f[c, d, 1] == 2, f[c, d, -1] == 1}, {c, d}]; StringForm["c = 1, d = 2`", c, d] /. s[[1]]

2

c = 621455041; n = 74596505816855975484638389815392741477; sol1 = Solve[c == m^2, m, Modulus -> n] {{m -> 24929}, {m -> 52367465358866978466157125093802778}, {m -> 74544138351497108506172232690298938699}, {m -> 74596505816855975484638389815392716548}} If you want to know if it is right, substitiute the solution back into the equation And @@ ...

2

You have a bad attitude not to answer the asked questions. For example, my question number 3. They are not asked without reason. I try to answer nevertheless. So first of all your equations: eq1 = (4 x + 12 x^3 + 12 x^5 + 4 x^7 - 4 y - 2 x^2 y + 6 x^4 y + 2 x^6 y - 2 x^8 y + 2 x y^2 + 12 x^3 y^2 + 10 x^5 y^2 - 12 y^3 - 12 x^2 y^3 + 2 x^4 y^3 - 2 x^8 ...

2

From the documentation: If dom is Reals, or a subset such as Integers or Rationals, then all constants and function values are also restricted to be real. So if a complex number is involved, specify the constraints as constraints rather than a domain. Since you did not specify the form of h, as an example let its form be h = (x - r0) + (y + r0)*I. ...

2

It's better to stay away from loops in Mathematica: k = 6; l = Tuples[ConstantArray[Range[k - 1], 4]]; p[{a_, b_, c_, m_}] := Module[{w = Exp[(2*Pi*I*m)/k]}, x^4 - 6*x^2 - x*(w^(a - c) + w^(c - a) + w^b + w^(-b) + w^(b - c) + w^(c - b) + w^a + w^(-a)) + (3 - w^c - w^(-c) - w^(a + b - c) - w^(-a - b + c) - w^(a - b) - w^(-a + b))] sols = ...

2

Wolfram|Alpha is more willing to change the input because the input is generally natural language. Alpha has interpreted hw has two single-letter symbols, h and w. Mathematica has interpreted hw as a single two-letter symbol. Because you asked Mathematica to solve for h and h does not appear in the expression, there is no solution. Adding a space tells ...

1

You can solve for the reciprocal of res: capacitance =.; Solve[i[250*10^-6, res] == 10^-6 /. res -> 1/reciprocal, reciprocal, Reals] Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >> {{reciprocal -> ...

1

If you need to compute Roots, you can then extract the numerical roots this way: myRoots = Roots[x^2 + 15 x + 13 == 0, x]; Max@Level[myRoots, 1, Heads -> False][[All, 2]] or Sort@Level[myRoots, 1, Heads -> False][[All, 2]]

1

One can go about this using an anzatz that each product of variables is replaced by a sum of corresponding new variables. Some GroebnerBasis rewriting and reduction by the result can then recover the desired form. convertEqToQuadraticForm[form_, t_] := Module[{vars = Variables[form], len, tvars, reps, allvars, gb}, len = Length@vars; tvars = Array[t, ...

1

Try this: This makes everything b-dependent: Map[TrigExpand, expr] /. {Sin[a] -> n*Sin[b], Cos[a] -> Sqrt[1 - n^2*Sin[b]^2]} // Simplify (* -((R Csc[b] (n - n^3 Cos[2 b] + Cos[b] Sqrt[4 - 2 n^2 + 2 n^2 Cos[2 b]] + Sqrt[4 - 2 n^2 + 2 n^2 Cos[2 b]] Cos[3 b] - n^2 Sqrt[4 - 2 n^2 + 2 n^2 Cos[2 b]] Cos[3 b] - 3 n Cos[4 b] + ...

Only top voted, non community-wiki answers of a minimum length are eligible