New answers tagged

0 votes

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: ...
user avatar
  • 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]. ...
user avatar
  • 16.4k
0 votes

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][[...
user avatar
  • 1,110
3 votes

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 ...
user avatar
  • 1,184
6 votes

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 ...
user avatar
  • 54.4k
0 votes

Solve eigen-matrix equation

The first equation yields: ...
user avatar
  • 26.8k
3 votes

System of equations

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

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. ...
user avatar
  • 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, ...
user avatar
  • 1,110
3 votes

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 ...
user avatar
  • 123k
1 vote

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

...
user avatar
  • 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 ...
user avatar
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,...
user avatar
  • 61.5k
2 votes

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 ...
user avatar
  • 61.5k
5 votes

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 ...
user avatar
6 votes

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: ...
user avatar
  • 124k
8 votes
Accepted

Applying Numerical Differentiation on the solution of a FindRoot problem

Here is one solution: ...
user avatar
  • 4,463
4 votes

mathematica is not able to solve this system

Try NMinimize: ...
user avatar
3 votes
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 ...
user avatar
  • 34.6k
2 votes
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] ...
user avatar
  • 112k
4 votes

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]];
user avatar
  • 4,463
5 votes
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. ...
user avatar
  • 219k
5 votes

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 ...
user avatar
  • 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 ...
user avatar
  • 633
3 votes
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 ...
user avatar
  • 219k
0 votes

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. ...
user avatar
  • 16.4k
2 votes

Numerical solution of the inverse contour plot

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

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 ...
user avatar
  • 35.7k
5 votes
Accepted

Numerical solution of the inverse contour plot

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

Numerical solution of the inverse contour plot

Take the point pairs from ContourPlot ...
user avatar
3 votes
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. ...
user avatar
  • 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: ...
user avatar
  • 24.5k
0 votes

How to solve this matrix equation

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

How to solve this matrix equation

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

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: ...
user avatar
  • 24.5k
7 votes

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: ...
user avatar
  • 4,463
9 votes
Accepted

Asymptotic inverse function?

...
user avatar
  • 36.9k
2 votes
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.
user avatar
  • 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 ...
user avatar
  • 4,463
3 votes

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

Provide the conditions to FullSimplify too. ...
user avatar
  • 16.4k
4 votes
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. ...
user avatar
  • 219k
3 votes
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]: ...
user avatar
  • 4,463
6 votes

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: ...
user avatar
7 votes
Accepted

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

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

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: ...
user avatar
  • 36.9k
8 votes
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. ...
user avatar
5 votes
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): ...
user avatar
4 votes

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 ...
user avatar
  • 35.7k
6 votes

Solve conditional term with mathematica

A simpler way is as follows. Simplify[(x^3 + y^3)/(x^2 + y^2), {x + y == 3, x y == -1}] 36/11
user avatar
  • 17.6k
8 votes

Solve conditional term with mathematica

The lazy way to do this is to evaluate Solve[{z == (x^3 + y^3)/(x^2 + y^2), x + y == 3, x y == -1}, z, {x, y}] {{z -> 36/11}} The clever way to do this is ...

Top 50 recent answers are included