Tag Info

New answers tagged

7

This is a bug, I think, and I filed it as such: The second region should not evaluate to a RegionQ BoundaryMeshRegion. A BoundaryMeshRegion is valid if it contains a closed surface. The subtle point about BoundaryMeshRegion is that this closed surface is a (sparse) representation of the entire region the surface encloses. Why the first one does not work, I ...


1

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}


3

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*)


0

I'm not sure that I would call $\partial z/\partial x$ the gradient in this context but, assuming your condition is on $\partial z/\partial x$, you could do something like this: eq = x^2 + y^2 + z^2 == 1; deriv = Derivative[1, 0][z][x, y] /. First[ Solve[D[eq /. z -> z[x, y], x], Derivative[1, 0][z][x, y]]] /. z[x, y] -> z (* Out: -x/z *) Note ...


3

Here is a way to do what you want using DiscretizeGraphics as suggested by @user21. No need to call NDSolveFEM` r = RegionDifference[Ball[{0, 0, 0}], Ball[{0, 0, 1}]] rp = RegionPlot3D[r, PlotPoints -> 50] Now we discretize the Graphics object with the following clever replacements that somehow works: DiscretizeGraphics[Normal[rp /. {(PlotRange ...



Top 50 recent answers are included