Hot answers tagged

4

You may start with this, add whatever you need and then remove the unnecessary manipulation parameters: Manipulate[Show[{ Graphics[{Opacity[0.5], Red, Rectangle[{1 + a, c + b}, {2 + a, 4 + b}]}, PlotRange -> {{0, 2}, {-3, 0}}, Axes -> True, AxesOrigin -> {1 + a, c}], Plot[{-(P*x^2/6) (3 - x), -k*x}, {x, 0, 1}, Axes -> ...


3

The reason why the contour is broken is because ContourPlot seems to be based on the Intermediate Value Theorem and it will fail to find points where the function just touches zero. The details have been discussed in the post Problem with ContourPlot. For your question, you can first factor out x and y, then the contour will be fine: P[x_, y_] := ...


3

Reduce[ForAll[x, a x^2 + b x + c == a (x - x1) ( x - x2)], {x1, x2},Backsubstitution -> True] gives you the solution you want.


3

I guess this is worth explaining a little better. Here is what I get running the exact code: You can see the error message and the domain say the integration stopped around 0.0473. The trouble arises here, if you don't notice that and plot over your specified range Plot[h[r] /. First@sol, {r, 10^-18, 1}] you get a plot, but its just garbage past ...


1

As mentioned in the comments that DSolve will be unable to solve this nonlinear coupled system of two ODE's. Instead you can use NDSolve. Here is my try omega = 1.83465945; a0 = 0; epsilon = 0.5; Eq1 = y1''[x] == (Sqrt[(1 - epsilon^2)/((Sqrt[1 + a0^2] + y2[x])^2 - epsilon^2*(1 + y1[x]^2))]/epsilon^2 - omega^2) y1[x]; Eq2 = y2''[x] == (Sqrt[(1 - ...


1

m = 2; x = Array[xi, m]; f = Array[fi, m]; fi[i_] := xi[i] - 1/i xi[i]^2; sol = Solve[Grad[f, x] == 0, x] (* {{xi[1] -> 1/2, xi[2] -> 1}} *) xo = x /. sol[[1]]; FindRoot[Cases[Flatten@Grad[f, x], Except[0]] == 0, Thread@{x, xo}] {xi[1] -> 0.5, xi[2] -> 1.}


1

Clear[m, x, x1, x2, f, fi]; m = 2; x = Array[xi, m]; f = Array[fi, m]; fi[i_] := xi[i] - 1/i xi[i]^2; sol = Solve[Grad[f, x] == 0, x] FindRoot[Flatten[Table[Grad[f, x][[n, n]] == 0, {n, 1, m}]], Table[{xi[n], 1}, {n, 1, m}]] {xi[1] -> 0.5, xi[2] -> 1.} For very large m you can use a RandomInteger[] or RandomReal[] randomize ...


1

Using upper case letters for the beginning of a symbol is frowned upon so I am going to replace A and B with u and v. So your equilibrium system becomes: dA = c u + b v - a u dB = d v + a u - b v Now when we replace a with 1 and b with 2 we get dA /. {a -> 1, b -> 2} (* -u + c u + 2 v *) dB /. {a -> 1, b -> 2} (* u - 2 v + d v *) Below is ...



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