Tag Info

New answers tagged

0

In Mathematica 10: domain= ImplicitRegion[0 <= x <= 1 && -1 <= y <= 1 || -1 <= x <= 1 && 0 <= y <= 1, {x,y}]; sol = NDSolveValue[{D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == -1, DirichletCondition[u[x, y] == 0, True]}, u, Element[{x, y}, domain]]; Plot3D[sol[x, y], Element[{x, y}, domain]]


0

Thanks. I ended up using In[1]:= region = ImplicitRegion[ Or[0 < x < 1 && -1 < y < 1, -1 < x < 1 && 0 < y < 1], {x, y}] NDSolveValue[{\!( *SubsuperscriptBox[([Del]), ({x, y}), (2)](u[x, y])) == -1, DirichletCondition[u[x, y] == 0, True]}, u, {x, y} [Element] region] In[2]:=Plot3D[%[x, y], {x, y} [Element] region] ...


2

here is another way to approach the problem...


4

Since you give the constraint l > x > 0, you should make use of that constraint f[x_] = 1/2 Sqrt[(l^4 + x^4)^2/(l^4 x^2)]; min = FullSimplify[ Minimize[{f[x], l > x > 0}, x], l > x > 0] min[[1]] == Simplify[f[x /. min[[2]]], l > 0] True f'[x] /. min[[2]] 0 Simplify[(f''[x] /. min[[2]]) > 0, l > 0] True


8

The output looks fine to me. It is, however, relatively complicated. Consider the following simpler example Minimize[x (x - c), x] (* Out: {-c^2/4, {x -> c/2}} *) Thus, there is a minimum value of $y=-c^2/4$ at $x=c/2$, as expected. Now, let's complicate things slightly. Minimize[c x (x - c), x] This is a piecewise expression, which is ...


6

Manipulate[ p = {x, s@x} /. Last@Minimize[{s@x, l > x > 0}, {x}]; Plot[s@x, {x, 0, l}, Epilog -> {PointSize[Large], Point@p}, PlotLabel -> p], {l, 1, 10}, Initialization :> {s@x_ := 1/2 Sqrt[(l^4 + x^4)^2/(l^4 x^2)]}]


1

Similar to @belisarius comment except I understood your question to ask for b in terms of a. If the equaton can be solved symbolically, equate the two solutions and solve the resulting equation for b. For example eqn = a*x^2 + b*x + c == 0; sol = Solve[Equal @@ (x /. Solve[eqn, x]), b] {{b -> -2 Sqrt[a] Sqrt[c]}, {b -> 2 Sqrt[a] Sqrt[c]}}


3

Something like this? A = {{1, 1}, {1, 1}}; X = {{x x + y y, x x - w w}, {w w - z z, y y + z z z}}; Solve[And @@@ MapThread[Equal, {A, X}, 2], Variables@X]


1

It is worth mentioning DSolve works similarly to Solve, and that NSolve will give you a numerical representation of a number rather than a symbolic. for example, say I want to find the roots of $x^{2} - 2 = 0$ Solve[x^2 - 2, x] == 0 will return $\sqrt{2}, -\sqrt{2}$, but NSolve will return {{x -> -1.41421}, {x -> 1.41421}} Also, I think DSolve ...


1

you can get result as follows: Reduce[a[-x] == b[x], x] // Quiet (*x < 0 || x == 6.92894 || x > 27.3475*) you can see that the logical solution is 6.93. to get that exactly use: sol = x /. Solve[{a[-x] == b[x], 0 < x < 20}, x][[1]] // Quiet (*6.92894*) or sol = x /. FindRoot[a[-x] == b[x], {x, 6}] (*6.92894*) to visualize the solution: ...


1

Actually that should be rather simple. So I sketch the way to leave some work for you. 1) Make a coordinate transformation such that the equation for the plane becomes $y=0$. 2) Apply the same transformation to the first equation and solve it, knowing that $y=0$. 3) Transform the solution back to get the graph in the original coordinate system.


2

Just put your equation into list eq. Then NSolve was able to solve the system (about 1/2 hour on my old laptop) NSolve[eq /. q[2] -> 1, {q[1], q[3], q[4], q[5], q[6], q[7], q[8], q[9], q[10], q[11], q[12], q[13]}] The result is too long to be posted here.


2

observe since Cosh blows up the solutions are all near the zeros of the periodic Cos: x /. # & /@ Flatten[Table[ FindRoot[ Cos[x] Cosh[x] - 1 , {x, Pi(1/2 + n)}, WorkingPrecision -> 20] , {n, 1, 100}]] {4.7300407448627040260, 7.8532046240958375565, 10.995607838001670908, \ 14.137165491257464177, 17.278759657399481438, ...


1

I would use Solve. It gives a list of rules for the exact solutions on a bounded domain. Solve[Cos[x] Cosh[x] == 1 && 0 < x < 50, x, Reals] (* output omitted *) N[%] (* ...


3

a = {{1, 1, 1}, {1, 0, 1}}; b = {6, 4}; Reduce[{a.{x, y, z} == b, x > 0, y > 0, z > 0}, {x, y, z}, Reals] (* 0<x<4 && y == 2 && z == 4-x *) Find one instance: FindInstance[{a.{x, y, z} == {6, 4}, x > 0, y > 0, z > 0}, {x, y, z}, Reals] (* {{x -> 2,y -> 2,z -> 2}} *) Find three instances: ...


3

EDIT 05.04.14 / 04.12.14 Let us consider a function of the form f[x_] = v[x]^2/(1+v[x]^2) with v[x_] = a + b x + c x^2 + d x^3 Then (i) f is in [0,1) (ii) because f'[x] = (2 v[x] v'[x])/(1 + v[x]^2)^2 there are at most two extreme values of f[x], at the zeroes of v'[x] which are at x+- = (-c +- Sqrt[c^2 - 3 b d])/(3 d) Their position can be ...


0

It is not an independent answer, but some modification of the previous one. One can make an evident replacement: eq1 = Abs[x]^2 + Abs[y]^2 + Abs[z]^2 + Abs[u]^2 == 1 /. {Abs[x] -> Sqrt[X], Abs[y] -> Sqrt[Y], Abs[z] -> Sqrt[Z], Abs[u] -> Sqrt[U]} eq2 = 3 Abs[x]^2 + Abs[y]^2 == Abs[z]^2 + 3 Abs[u]^2 /. {Abs[x] -> Sqrt[X], Abs[y] ...


1

Because you have two equations and four unknowns, you have a two-fold infinity of solutions. Your FindRoot calculation has given you just one of them. You can Solve for them as follows. Solve[{eq1, eq2}, {u, z}] with the solution {{u -> -(Sqrt[-1 + 4*Abs[x]^2 + 2*Abs[y]^2]/Sqrt[2]), z -> -(Sqrt[3 - 6*Abs[x]^2 - 4*Abs[y]^2]/Sqrt[2])}, {u ...


3

Just to elaborate the advice of bbgodfrey. I take it, you do not need to have that precise numbers. The 2-digit precision is enough? Then here are your equations: eq1 = -0.23094021403064358` + (-2 g0[y] + g1[y])/(1.043747093724331` g0[y] + 1.0437470937243307` g1[y]) - (1.043747093724331` (-g0[y]^2 + g0[y] ...


2

Integrate[f, x] integrates the function that is a constant (with value f), so the answer is f x. Then you are solving f x=x^4. The correct answer is, of course, f=x^3. It looks like what you are trying to do is to find the function f[x], which, when integrated, gives x^4. The way to solve this is to take derivatives of both sides of the equation. The left ...


0

assum = And @@ {c > 0, n >= 2, 0 < p < 1, a > c, b > 0} f[x_] := -c x^(n + p) - b x^n + (a - c) x^p - b Assuming[assum, FullSimplify@Reduce[f[x] == 0, Reals]]


1

By restriction I had in mind clipping: something like this. x1[t_] := Evaluate[Sin[Clip[phi1[t] /. sol, {-Pi/4, Pi/4}]]] y1[t_] := Evaluate[-Cos[Clip[phi1[t] /. sol, {-Pi/4, Pi/4}]]] x2[t_] := Evaluate[Sin[Clip[phi1[t] /. sol, {-Pi/4, Pi/4}]] + Sin[Clip[phi2[t] /. sol, {-Pi/4, Pi/4}]]] y2[t_] := ...


6

Large t Approximation Because this is a neutral delay integral-differential equation, solving it may seem very difficult at first glance. However, the term 1/5^t makes the integral negligible for t greater than about 2. So, with the integral ignored for large t, the equation can be reduced to x[t] - x[t - 1]/(2 E) = c[2] t^2 + c[1] t + c[0] where the ...


2

One possibility would be to use Reduce instead of Solve. With your equation above (but change the g[4] to x[4]) this gives: Reduce[eqn, vars] (x[2] == 0 && x[5] == 0) || (x[2] == 0 && x[7] == 0) || (x[3] == 0 && x[4] == 0 && x[5] == 0) || (x[3] == 0 && x[4] == 0 && x[7] == 0) || (x[5] == 0 && x[3] ...


0

ContourPlot[ Tan[ a Sqrt[al]]/Sqrt[al] + (Tan[ (1 - a ) Sqrt[al]]/Sqrt[al] + 10^-10) == 1, {a, -10, 10}, {al, 0, 10}, ContourStyle -> {Thick, Red}, GridLines -> Automatic, AspectRatio -> Automatic] Plot3D[ Tan[ a Sqrt[al]]/Sqrt[al],{a, -5, 5}, {al, 0, 10}] The extended domain plot is sufficiently regular for tan function with vertical ...


1

What about such a solution: lst = Table[{b, (FindRoot[(D[f[a, b], a] // Simplify[#, a > 0] &) == 0, {a, 1.2}] // Chop)[[1, 2]]}, {b, 2, 5, 0.1}]; model1 = p1 + p2*b + p3/b; ft = FindFit[lst, model1, {p1, p2, p3}, b] Show[{ ListPlot[lst], Plot[model1 /. ft, {b, 0, 5}, PlotStyle -> Red] }, Epilog -> ...


1

χ /. First[NSolve[SetV == #/(Cpf (1 - χ)), χ]] & /@ demand or equivalently χ /. First@Solve[SetV == dem/(Cpf (1 -χ)), χ] (-dem + Cpf SetV)/(Cpf SetV) and now (-# + Cpf SetV)/(Cpf SetV)& /@ demand {(-1.92*10^6 + Cpf SetV)/(Cpf SetV), (-2.07*10^6 + Cpf SetV)/( Cpf SetV), (-2.37*10^6 + Cpf SetV)/( Cpf SetV), (-2.72*10^6 + Cpf SetV)/( ...


1

Simple replace should do the trick χ /. {{χ -> (-1.92`*^6 + Cpf SetV)/(Cpf SetV)}} Yields {(-1.92*10^6 + Cpf SetV)/(Cpf SetV)}


2

I did the following. Subtract one side from the other to get expressions from equations, square each and sum. I want to use that sum of squares as my constraint equation. --- edit --- The somewhat lengthy equations may be found here. There also were variants here and here, but I used that first (I believe I did not get very good results with the others). ...


0

looking at the solutions generated from @belisarius solution: http://mathematica.stackexchange.com/a/64155/22547 Transpose[{ eq[[All, 1]], eq[[All, 2]]} /. sol] // MatrixForm the answer to question 1 is yes the solution is very wrong. (I am puzzled belisarius he evidently didn't see that error, all I did was copy your equations and plug in to his ...


2

This is really more of a comment, but it's too long. I would try to solve this starting with a smaller analogous problem. For instance, the n=2 version of this readily gives an answer: n = 2; sys = Flatten[Table[Table[Table[Table[ Sum[a[i, j, k] a[k, l, h] - a[j, k, l] a[i, l, h], {l, 1, n}] == 0, {h, 1, n}], {k, j, n}], {j, i, n}], {i, 1, ...


5

A simple approach is to use a Rule to replace the Rule... equation = Solve[{x^2 + y == 2, y == 1}, {x, y}] /. Rule -> Equal {{x==-1,y==1},{x==1,y==1}} Here, Rule is the full form of the arrow ->.


0

RSolve[a[n] - a[n - 10] == 101, a[n], n] // AbsoluteTiming also given a DifferenceRoot object, consider a[n-1]-a[n-11]==101, so a[n]-a[n-10]==a[n-1]-a[n-11] RSolve[a[n] - a[n - 10] == a[n - 1] - a[n - 11], a[n], n] worked fast. So we can using method of undetermined coefficients Clear["`*"]; expr = Collect[RSolve[a[n] - a[n - 10] == a[n - 1] - a[n - ...


2

For a start I think you may need to use SetDelayed (:=) instead of Set (=). Then be careful with the spaces, a b c (the product of three different variables) is not the same as abc (a single variable). Then porbably you want something like this: ClearAll[a, b, c, d, e, f, g, h, i, j, k] Panel[Grid[{{Style["Inputs", Bold], SpanFromLeft}, {"a:", ...


1

sol=Assuming[ -10 < k < 10, Simplify@Solve[ And @@ { k*x - (x - y)*y^2 == 0, y + (x - y)*y^2 - (1 - x - y) == 0 }, {x, y}] ]; that is the analytical solution (there are three). You can evaluate that numerically dat=Transpose@Table[Chop@N[{x, y} /. sol], {k, -10, 10, 0.1}]; ListLinePlot[dat] empty regions are complex


1

Since nobody has posted a "messy" solution yet, let me: if the matrices are in one list alist = {a1,a2,...,an} and the rhs' are in another, blist = {b1,b2,...,bn} then Clear[x]; vars = x[#] & /@ Range[n]; vars /. Solve[Dot[#1, vars] == #2 & @@@ Transpose[{alist, blist}], vars]



Top 50 recent answers are included