A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
7

This problem can be solved as follows. First, solve diff with h[z] treated as a parameter and the constants as listed in the queston to obtain an explicit expression for f'[z]. diff /. {h[z] -> h, n -> 1/2, i -> 1/2, L -> 2/5} (* (f'[z] (1/2 + 1/(2 (1 + (4 f'[z]^2)/(25 h^2))^(1/4))))/h == -h z *) Simplify[(h # - i f'[z]) & /@ %]; solf = ...


6

The primary issue in this question is plotting resolution. Both Plot and ContourPlot sample the function to be plotted at a finite number of locations. If none of these locations is sufficiently near a portion of the desired curve, then that portion may be missed. In this case, greatly increasing PlotPoints and setting MaxRecursion yields, Plot[function[3,...


5

It seems to me that fa[a] behaves relatively well with respect to FindRoot and plotting but not simplification. That a computation, whether or not it is FindInstance[], might exhaust system resources is unremarkable, but it's likely that an exact-symbolic computation with floating-point numbers will be worse. On things that would cancel or equal each other, ...


5

I think that mixing of huge numbers and machine precision is what's making Mathematica go crazy (so this is not a bug, but a lack of feature). In general, running functions best suited for analytic expression transformations like FullSimplify and FindInstance on expressions with floating point numbers is a bad idea except in simple, well-understood cases. ...


4

Not a solution but an extended comment with a speculative answer to a different problem. Let's look for the maximum number $m$ of unit vectors that can be arranged in $n$ dimensions such that $\vec{p}_i\cdot\vec{p}_j\le\epsilon$. Notice I removed the absolute value in the scalar product. We call this function $\hat{m}_n(\epsilon)$. Let's study all the values ...


3

SparseArray`KrylovLinearSolve[A, a, "Method" -> "BiCGSTAB", "Preconditioner" -> f, "StartingVector" -> solF ] might get you rid of some calling overhead. But improving the quality of your preconditioner will have a considerably larger effect. If LinearSolve[B] works as a preconditioner, then possibly its incomplete LU preconditioner might ...


3

Solve the first equation for $M$, and plug that in to the RHS of the second equation. You get an expression that, for positive $ϵ$, bottoms out around 85 (with $ϵ$ near $0.02$. In particular, it never gets anywhere near $6.6612$.


3

Not sure if I'm missing something here, but assuming your vector space is Euclidean it seems to me that for small $\epsilon$ the number of such vectors is still $n$. Here my thoughts: For $\epsilon=0$, we can pick a particular basis of $n$ such vectors, say $$|v_i\rangle=\vec{e}_i=\delta_{i,j}~~~,~~~i,j=1,2,...,n$$ If we relax $0<\epsilon\ll1$, the ...


2

In this sort of problem in which $y=h(x)$ is defined implicitly by $g(x,y)=0$, we can compute its derivative $h'(x)$ in terms of $g(x,h(x))$: fy /: fy' = (fy'[#] /. First@Solve[D[dy[#, fy[#]] == 0, #], fy'[#]] // Evaluate) &; Here $h$ is fy and $g$ is dy. Now FindRoot can calculate the derivative (Jacobian) of dxnoy. ClearAll[f, fy, dx, dy, ...


2

Complete rewrite of my answer...a counter-example. Consider an hypersphere with unit radius embedded in an $n$- dimensional space, and consider a regular simplex inside the sphere with vertices on the sphere. The simplex will have the following properties: the simplex will have $n+1$ vertices (and vectors to those vertices from the origin) the angles (and ...


1

The Helmholtz equation is a reaction-diffusion equation. There are many examples in the documentation. Maybe something like this: region = RegionDifference[Rectangle[{0, 0}, {5, 10}], Disk[{5, 5}, 3]]; op = -Laplacian[u[x, y], {x, y}] - u[x, y]; bcs = {DirichletCondition[u[x, y] == 0, x == 0 && 8 <= y <= 10], DirichletCondition[u[x, y] == ...


1

I'm not sure I understood, but if you only need to add some lines to existing plot from cited question: T = 10; Y = ParametricNDSolveValue[{X'[t] == Boole[X[t] > 0], X[0] == x}, X, {t, 0, T}, {x}]; Show[Plot[{x, x + Range[10]}, {x, 0, 10}, PlotRange -> {{-10, 10}, {0, 10}}, PlotStyle -> {Blue, Green}], Table[ParametricPlot[{Y[x][t], t}, {t,...


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