# Tag Info

## Hot answers tagged equation-solving

11

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 &]; ...

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

9

Mathematica will not always give you answers the way you want it. Sometimes a little bit of massaging needs to be done. In this case let's define some rules: logrule = {Log[x_] + Log[y_] :> Log[x y], n_ Log[x_] :> Log[x^n]} expr = Solve[z == x^m y^n && z == \[Tau] x^(m - 1) y^(1 - n), {x, y}]; Then: expr //. logrule You can also use ...

9

Although I don't know exactly why Refine fails in this example, Reduce can often help when simpler methods fail. Here, I feed it the desired statement together with the assumptions which are specified in Assuming: statement = x + (1 - x) (1 + y)^z > 0; Assuming[0 < x < 1 && 0 < y < 1 && 0 < z < 1, ...

8

I've fiddled with this on and off for a while now, hesitating to decide whether it was worth posting since another answer has already been accepted. The undocumented function, Experimental`OptimizeExpression, can be used to break down the solutions algebraically into common subexpressions, and it seemed like an approach worth sharing. On the other hand, ...

7

you can also try: PolarPlot[2/Cos[t], {t, 0, Pi/4}] or ContourPlot[x == 2, {x, 0, 4 Pi}, {y, 0, 4 Pi}] If you want to find the area using other method, I would suggest to use Area and ImplicitRegion in V10 as follows: r = ImplicitRegion[y >= Exp[-x] && x <= 2 && y <= 1, {x, y}]; Area[r] (*(1 + E^2)/E^2*) for shading issue ...

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

6

Abstract This is not exactly the requested solution, but it is parametrized, and I think it will give some insight and can possibly be improved. With this code (modified 03.09.14 11:30) it is possible to determine all integer solutions to $1=\sum _{i=1}^n \frac{1}{a(i)}$ without the $a(i)$ being bounded by $amax$, by letting $amax=\infty$. In this sense ...

6

There is a difficulty with the statement of the problem. Generally the problem can be solved as shown below. In this case there is a stipulation that $1 < x < 5$ and $1 < y < 5$. Unfortunately the solution to the system does not satisfy these constraints (also shown below). If we agree to use only numerical techniques and pretend that Solve ...

6

Its my understanding that you want to insist on using Plot for this problem. Then how about defining a function that has a vertical jump at x=2 and otherwise exceeds the required PlotRange so that its remaining parts won't show up? Plot[100 Sign[x - 2], {x, -3, 3}, ExclusionsStyle -> Red, PlotRange -> {-1, 1}]

6

There are a number of issues with your code. First, GaussianDistribution is not a built-in function; I think you want to have NormalDistribution in combination with RandomVariate. Secondly, SetDelayed (:=) returns Null (or $Failed if something went wrong), so y has the value Null after your second line. Hence the lines after that don't work. Allow me to ... 5 As suggested by george2079 the equation can be solved by substition: Reverse@Simplify[f[x] == 2 x + 1/x - f[1/x]/2 /. f[1/x] -> 2/x + x - f[x]/2] f[x] == 2 x To find$f^{-1}(4)$you can use f = 2 # &; InverseFunction[f][4] 2 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 ... 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 ... 5 eq = (60 - r/2) (70 - ca - r/2) - (60 - r/2 - ca + (4/25) (70 - r/2 - ca))*(70 - r/2) == 0 sol = Solve[eq,ca]; caFun[r_] := Evaluate[ca /. sol[[1]]] caFun[r] (* ((-19600 + 280 r - r^2)/(2 (-265 + r)) *) 5 The new V10 region functionality is rather suited to implementing your description of the problem in a direct way: reg = ImplicitRegion[y < 1 && y > E^-x && x < 2, {x, y}]; Show[BoundaryDiscretizeRegion[reg, {{0, 2}, {E^-2, 1}}], Axes -> True, AxesOrigin -> {0, 0}, AspectRatio -> 1/GoldenRatio] Also for finding the ... 5 Forgive me if this is not useful but sometimes I find value in using Interval in such problems: x = y = z = Interval[{0, 1}]; x + (1 - x) (1 + y)^z Interval[{0, 3}] Interval represents a closed interval rather than the open intervals in your example so this is not equivalent, nevertheless it may help to find the bounds of an expression. 4 The various powers involving p serve to bury the x too deep to be able to solve for it without additional assumptions. To make the job of specifying such assumptions easier, I'll introduce an auxiliary variable z. First I solve for z, which requires only two additional assumptions to allow Solve to invert the powers. The result is stored in zSolution. Then I ... 4 I shoot for reasonable clarity instead of performance - in my opinion observed <1.5 hour runtime is acceptable, considering clarity - at least to my eyes - of the solution: With[{b = LCM @@ Range@100}, Select[b/IntegerPartitions[b, {10}, b/Range@100 // Reverse], Unequal@@#&]] Here all numbers are multiplied by b, least common multiplier for all ... 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 4 A simpler solution would be to use Eliminate sol = y /. First@Solve[Eliminate[{eqn1, eqn2}, z], y] -((1 + 2 x - 7 x^2 - 14 x^3)/(x (2 + 21 x^2))) Plot[sol, {x, -2, 2}, PlotRange -> {-2, 2}, Frame -> True] 4 UPDATE: version 10.0.1 on a Mac produces the same behavior. An extended comment and observation.$Version "10.0 for Mac OS X x86 (64-bit) (June 29, 2014)" The double integral evaluates only with integration over c as the outer integral int1 = Integrate[1/(E^((a - c)^2 + (b - c)^2)), {c, 0, 1}, {b, -Infinity, Infinity}] Investigating the ...

3

Let's define a polynomial p of one variable x depending on two parameters A and L: p[x_, A_, L_] := 96 x^8 − 192 L x^7 + (768 π^2 A^2 + 128 L^2) x^6 + (−64 L^3 − 640 A^2 π^2 L) x^5 + (2655 π^4 A^4 − 640 L^2 π^2 A^2 + 32 L^4) x^4 + (384 A^2 L^3 π^2 − 578 A^4 L π^4) x^3 + (4476 π^6 A^6 − 2760 L^2 π^4 A^4 + 128 L^4 π^2 A^2) x^2 + (456 ...

3

With the help of Bill's edits, the code should look like this: Clear[f, omega, alpha, beta, h, M, T, v, rho]; eta = Sqrt[beta^2 (Sqrt[4 alpha^2 omega^2/beta^2 + 1] - 1)/(2 alpha^2)]; chi = Sqrt[beta^2 (Sqrt[4 alpha^2 omega^2/beta^2 + 1] + 1)/(2 alpha^2)]; alpha = Sqrt[h^2 M/(12 (1 - v^2) rho)]; beta = Sqrt[M T/((1 - v^2) rho)]; a = 1; ...

3

Factor x^p out of the last term to get w == a p (a + b (y/x)^p)^(1/p-1) then use Eliminate[{{w == a p (a + b z^p)^(1/p - 1), z == y/x}}, z] to get ((-a + ((a p)/w)^(p/(-1 + p)))/b)^(1/p) == y/x && x != 0 $\left(\frac{\left(\frac{a p}{w}\right)^{\frac{p}{p-1}}-a}{b}\right)^{\frac{1}{p}}=\frac{y}{x}\land x\neq 0$

3

sol1 = Solve[1 - 3 x y == 5 z - 2 x, z] sol2 = Solve[y == 7 x z - z/x /. sol1, y] Plot[y /. sol2, {x, -5, 5}] Solve[Simplify@Eliminate[{1 - 3 x y == 5 z - 2 x, y == 7 x z - z/x}, z], y]

3

Dom = ImplicitRegion[ x^2 + y^2 >= 1 && x^2 + y^2 <= 5, {x, y}]; c = { DirichletCondition[u[x, y] == 200, x^2 + y^2 == 1], DirichletCondition[u[x, y] == 0, x^2 + y^2 == 5]}; result = NDSolveValue[{\!$$\*SubsuperscriptBox[\(\[Del]$$, $${x, y}$$, $$2$$]$$u[x, y]$$\) == 0, c}, u, {x, y} \[Element] Dom]; GraphicsRow[{ ...

3

Try something like this: z = z /. Solve[eqn1][[1]]; (*1/5 (1 + 2 x - 3 x y)*) Since you know how z is expressed through x and y, you can put it to the second equation, and get the solution for y. sol = y /. Solve[eqn2, y][[1]]; Plot[sol, {x, -2, 2}]

3

I actually just discovered Mathematica has an Eliminate function eqn1 = 1 - 3 x y == 5 z - 2 x eqn2 = y == 7 x z - z/x eqn3 = Eliminate[{eqn1, eqn2},z] Plot[y /. Solve[eqn3, y], {x,-2,2}, PlotRange -> {-2,2}]

3

Ok, here you have it, but in the future this kind of questions will most likely be closed because the main problem arises from very basic errors. You can't expect others do the debugging for you. Take a look at the functions' definitions. {UT1, RA1, MM1, Z, MU, a1, L} = Transpose[RandomReal[{0, 1}, {10, 7}]]; dt = 1; rvsum1[1] = 5320007.301; rvsum1[i_] := ...

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