Tag Info

bV diagram of TE modes guided by waveguides with a linearly tapered index profile

You've misunderstood the meaning of $m$ in the book. The following gives the desired plot: ...
• 54.1k
1 vote

Finding a (sufficient) condition for an inequality - Solve takes too long

Take Log of function and Log[10,variable] to have a chance to handle it and show a graphic of solution. Also restrict n>1 for real values of Log[n]. ...
• 16.4k

Is it possible to characterize the sign of the trace and det at the fixed points of a dynamical system using Gröbner, postponing computing the points?

This question was not formulated clearly enough. The now maybe evident answer which emerged after the discussions is that the variety generated by trg==0 (trg = GroebnerBasis[{ss, ifac, tr}, par, X][[...
• 1,110

Lyapunov exponents at a fixed point

After having a look at the code you have and the paper you linked, it seems to me that to get to your goal, you need the following steps (This is too long for a comment): Transform your differential ...
• 1,184

Smallest positive real solution with InverseWeierstrassP

Instead of playing with numerical solvers, we can exploit a canonical exact approach. Since the Weierstrass elliptic function $\wp$ is doubly periodic, taking an inverse of it makes sense only locally ...
• 54.4k

Solve eigen-matrix equation

The first equation yields: ...
• 26.8k

System of equations

Clear["Global*"] eqns = {9*m + 2 == x, 9*n + 3 == x + 631}; To just find examples, use FindInstance ...
• 123k

System of equations

If you replace "Mod" by x== .. + 9 a1 you may use Reduce and solve for x. And as MMA assumes all variables to be complex, you must define the variables as integers E.g. ...
• 26.8k
1 vote

Showing that a Hopf bifurcation exists?

I will make a guess that this system comes from an application involving positive variables and parameters. This "essential nonnegativity" is only possible if the first equation is wrong, ...
• 1,110

How can I solve an equation numerically for a range of x-values and multiple initial root guesses?

Clear["Global*"] F[y_, x_] = 0.5/((y - x)^2 - 0.3*x^2) + 0.5/((y - x)^2 - 0.3*x^2) - 1/x^2 - 1; Solving for y ...
• 123k
1 vote

...
• 61.5k
1 vote

How can I solve an equation numerically for a range of x-values and multiple initial root guesses?

Don't use Grid in Intialguess = Grid[...] , it is only a formating option! Try ...
• 37.9k
1 vote

Why is first substituting for the known variable and then solving for an unknown variable, using Solve[], correct whereas doing the reverse is wrong?

In comments, OP mentioned that the actual problem is to find the second derivative of the function $x=f(\psi)$, and solve cannot find an explicit analytical expression for that function. This, however,...
• 61.5k

Why is first substituting for the known variable and then solving for an unknown variable, using Solve[], correct whereas doing the reverse is wrong?

Mathematica will automatically assume that all quantities are complex, unless explicitly told otherwise. In your case, if you specify that you want the real solutions to your equation, the two ...
• 61.5k

Is it possible to characterize the sign of the trace and det at the fixed points of a dynamical system using Gröbner, postponing computing the points?

My answer does not answer your doubts regarding the Groebner basis, but consider that it is an option to the problem of obtaining non-trivial equilibria. A viable option is to ...
• 4,623

Applying Numerical Differentiation on the solution of a FindRoot problem

One idea is to just augment your FindRoot call with information about the derivative. For your example, this might look like: ...
• 124k
Accepted

Applying Numerical Differentiation on the solution of a FindRoot problem

Here is one solution: ...
• 4,463

mathematica is not able to solve this system

Try NMinimize: ...
• 37.9k
Accepted

Solving logarithmic 2D Nonlinear GPE Equation

It is not clear how in the paper they normalize $\psi$ in Figure 1, may be as in equation (2). Without normalization we have ...
• 34.6k
Accepted

Can't solve an equation

It works if you give Reals domain b = 1/100; a = 1/10; f[x_] = Sin[Pi*a/b*Sin[x]]/(Pi*a/b*Sin[x]); Solve[f[x] == 7/10, x, Reals] ...
• 112k

Can't solve an equation

To avoid the problem with $\frac{0}{0}$ when $\frac{\sin x}{x}$ is evaluated at $x=0$, use Sinc: f[x_]:=Sinc[Pi*a/l*Sin[x]];
• 4,463
Accepted

Why is DSolve unable to solve this second order ode with initial conditions? Any workaround?

I'd report this to WRI. If buried in the DSolve code base is a way to solve this, then the decision tree misses it. Otherwise, they should implement a way. ...
• 219k

Why is DSolve unable to solve this second order ode with initial conditions? Any workaround?

With a bit of assistance, DSolve can obtain the desired solution. ode has a first integral, which is obtained by ...
• 58.6k
1 vote

How to solve equations in Gaussian integers modulo p

Since $p$ is prime, this equation only needs to be solved within finite field. Depending on $p$, if $p \equiv 1 \space mod \space 4$, then $\sqrt{-1}$ has good reduction on $\mathbb{F_p}$, gaussian ...
• 633
Accepted

How did DSolve solve for the constants of integrations in this ode?

Not sure what DSolve did, but I often try Sinc[z] when I see Sin[z]/z or ...
• 219k

Numerical solution of the inverse contour plot

Regard v as function of u, v[u], and differentiate function f[u,v[u]] to be zero with respect to u and generate interpolating function for v[u] with NDSolve. Here shown for two branches. ...
• 16.4k

Numerical solution of the inverse contour plot

Clear["Global`*"] To use FindRoot directly, ...
• 123k

Numerical solution of the inverse contour plot

sol = FindInstance[{BesselJ[3, Sin[u^2 - v]] == 0, -1 <= u <= 1, -1 <= v <= 1}, {u, v}, 1000]; ListPlot[{u, v} /. sol] Replay to comment ...
• 35.7k
Accepted

Numerical solution of the inverse contour plot

The problem appears to be solvable with an exact approach, e.g. ...
• 54.4k

Numerical solution of the inverse contour plot

Take the point pairs from ContourPlot ...
• 37.9k
Accepted

Obtaining numerically and efficiently a large number of zeroes

Intro. This is slow not because of NSolve, but because in OPs code, something like B[100] builds up a huge symbolic expression. ...
• 4,463
1 vote

solving linear systems with parameters

I have made a MatrixRankSym feature with symbolic computation here. And we can use for your this question directly: ...
• 24.5k

How to solve this matrix equation

You get rank == 2, if one row is the linear combination of the two others. ...
• 16.4k

How to solve this matrix equation

I have made a MatrixRankSym feature with symbolic computation here. And we can use for this question directly: ...
• 24.5k

How to solve this equation with rank relation of matrix

I have made a MatrixRankSym feature with symbolic computation here. And we can use it directly: For your first equation: ...
• 24.5k

Asymptotic inverse function?

@Roman's answer is exactly what you asked for, but as a check, here is a second answer using Bessel's series expansion for the solution of the Kepler equation: ...
• 4,463
Accepted

...
• 36.9k
Accepted

Reduce and FullSimplify don't reduce fully -- how to check if candidate solutions hold

Simplify[ x a^2 + y b^2 + (-x - y) a*b == 0, {a == 1/x, b == 1/y, y > x > 1}] True.
• 35.7k
1 vote

Find binary vector within fixed distance to reference vector that maximizes the number of distances to a set of vector that are below a threshold

The following is an adaptation of your code. I just tried to get it to work, still using Maximize, ignoring efficiency. Please ...
• 4,463

Reduce and FullSimplify don't reduce fully -- how to check if candidate solutions hold

Provide the conditions to FullSimplify too. ...
• 16.4k
Accepted

Strange issue with NSolve

@Nasser seems to be correct about different code paths. Personally, I will argue it's a bug, and it definitely should be reported to WRI tech support for them to consider. ...
• 219k
Accepted

How to detect the positive solution to this logistic boundary value problem

Let us try a shooting method. The following code produces the solution for a given value of f[0]: ...
• 4,463

How to code a sum in Mathematica and how to solve it?

This can of course be formulated as a linear-algebraic problem. Using Domen's example: ...
Accepted

How to code a sum in Mathematica and how to solve it?

Let's take a short example with $s=3$. ...
• 7,422

Reduce an expression where the variables can assume only $\pm 1$

If you just want the count: Count[Tuples[{-1, 1}, 8], v_ /; v[[1 ;; 4]] . v[[5 ;; 8]] == 0] (* 96 *) or with a more explicit criterion: ...
• 36.9k
Accepted

Reduce an expression where the variables can assume only $\pm 1$

Could just add the appropriate constraints. I set this up programmatically to save wear and tear on my four typing fingers. ...
Accepted

Problem in getting coefficients list of power series solution of y''[x]*y'[InverseFunction[y][x]] - y'[x] == 0?

The right way to do this is to start with an ansatz (note that the OP has neglected to explicitly declare the y'[0] == 1 condition): ...

Solve conditional term with mathematica

We consider that a[n]=x^n + y^n. To deduce the recurrence relation we compare with x^(n + 2) + y^(n + 2) and ...
• 35.7k