All Questions

Filter by
Sorted by
Tagged with
2
votes
1answer
62 views

Solving complex differential equation with ParametricNDSolveValue

I am trying to solve a complex differential equation for the function $S(u,v)$ depending on the parameter $\omega$. The code is: ...
3
votes
1answer
105 views

Cryptic NDSolve::nlnum when working with matrices

This problem was initially formulated in quaternions, but I had to rewrite them to complex matrices (as they seem to be supported better). Possibly introducing some errors along the way. So the ...
1
vote
0answers
43 views

Ordinary differential equation in the real domain

If I have the following equation (y - 1) ^5 == 32 I can select the real solution with Solve[(y - 1) ^5 == 32, x, Reals] Now, I ...
2
votes
2answers
190 views

Removing numerically vanishing complex part within NDSolve [closed]

I am using functions that are only well-defined for real values (e.g. HeavisideTheta) within NDSolve. Internally ...
0
votes
0answers
59 views

How to deal with first order complex differential equation?

I am trying to solve these two equations but find an error of fewer than the dependent variable and list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. I don't ...
0
votes
1answer
72 views

Can I simplify a PDE with Mathematica?

I'm a beginner in Mathematica and I search for help with a calculation problem with some derivatives and basic operations. I need to simplify a PDE that depends of a smooth function $f:U\subset\...
1
vote
1answer
37 views

Issue with Compile for Complex Input/Output

I'm writing a Runge-Kutta algorithm for solving a system of coupled differential equations. My code works fine when defined as a module, but when I try to compile it, I get the following error: ...
1
vote
1answer
81 views

How to solve first order complex differential equation?

I want to solve these differential equations and want to get the value of 'a1'. I used this code given below but it is not showing any result. If anyone can resolve this will be appreciated. ...
1
vote
0answers
34 views

Solving ODEs in the Complex Plane for General z

I saw with the new 12.0 update, they have introduced expanded functionality for solving complex ODEs. In the given example, they solve for $y(t)$ and plot results using the new ...
1
vote
1answer
46 views

Using AbsArgPlot on parametricNDSolve output [closed]

I have solved following equation using ParametricNDSolve $$ \frac{\mathrm d^2y}{\mathrm dx^2} + \left(a + \frac{2}{\pi} b\ \arctan x\right)y = 0 $$ ...
1
vote
0answers
30 views

Errors in NDSolve for complex matrices

This is the problem. It is quite simple, and looks unwieldy only because I had to rewrite quaternions as complex matrices. ...
0
votes
0answers
50 views

I want to plot root of the following complex equation

I am trying to plot the roots of the following equation as mentioned in the code below But it is not giving me output. If anyone can resolve this problem for me is most welcome. ...
0
votes
1answer
65 views

How to substitute by NDSolve solution to plot a new function

Assume I got some function by NDSolve , like y(t) ...
0
votes
1answer
122 views

How to chop a complex number?

I'm solving some differential equations by iterating and I want to use Chop to get rid of noice smaller than a certain threshold. However, I found that Chop only "chops" the real part, not the ...
3
votes
1answer
124 views

Problem with complex eigenvalues in periodic Sturm-Liouville problem

I'm having trouble using NDEigenvalues to obtain the first few eigenvalues for a differential operator on the circle of radius one-half. $\qquad Lf(x) = f''(x)+ (-...
3
votes
1answer
248 views

How to solve PDE with periodic and anti-periodic b.c.?

I need to solve the PDE for a complex function $A(x,t)=A_r(x,t)+iA_i(x,t)$ ...
3
votes
2answers
144 views

Complex solutions to ODEs

How do I solve the following IVP problem in Mathematica so that I get real solutions? $Q'(t)=b - \dfrac{Q(t)}{100-t}; \quad Q(0)=250$ I tried the following: $\text{$\$$Assumptions}=b>0;\text{$\$$...
3
votes
1answer
176 views

Complex first-order differential equation

I have a differential equation $\frac{dx}{dt} = \sqrt{1+x^4}$ $x$ is a complex variable. I want to solve it for some given initial condition, and plot the solution (real part vs. imaginary part). ...
-3
votes
3answers
177 views

Gives me a complex solution [closed]

A := DSolve[{D[((It - Ir) * x / L + Ir) * w''[x], {x, 2}] - p/Y, w[x] == 0, w'[0] == 0, w''[L] == M0/(Y*Ir), w'''[L] == -P/(Y*Ir)}, w[x], x] I want a real ...
10
votes
1answer
284 views

FiniteElement v.s. TensorProductGrid: which is reliable for Schrödinger equation with periodic b.c.?

This is a problem comes up in the discussion under this post and I think it's worth starting a new question for it. I suspect the underlying issue is the same as in this post, but not sure. Consider ...
3
votes
3answers
279 views

Problem of `Integrate` and `DSolve` with inhomogeneous Legendre differential equation

I have the following inhomogeneous Legendre differential equation $(m=n=2)$: ...
7
votes
2answers
196 views

Portion of Curve Omitted by Plot

In the course of addressing question 104559, I encountered the following problem with Plot. Begin with ...
2
votes
3answers
507 views

How to take derivative of the argument of an interpolating function

I am trying to plot the derivative of the argument of an interpolating function u[t, x] with respect to $x$. Here, u[t, x] is ...
0
votes
0answers
54 views

How can I eliminate InverseLaplaceTransform returning complex

I tried this: F = InverseLaplaceTransform[ 1/((1 + s^2) (1 + (s + 1/2)^2)) + Exp[-Pi*s]*1/((1 + s^2) (1 + (s + 1/2)^2)), s, t] But it returns an answer ...
6
votes
2answers
359 views

How to solve this trigonometric complex ODE system?

The system of nonlinear ODE is $$ \mathrm{i}\,s(\ddot p-\frac{1}{2}\sin{2p}\;\dot q^2)=\mathrm{i}\,c\sin p\;\dot q-a\sin p+b\cos p\cos q\,,\\ \mathrm{i}\,s(\sin^2p\;\ddot q+\sin{2p}\;\dot p\dot q)=-\...
2
votes
2answers
215 views

DSolve Solutions are sometimes not as simple as they could be

Why doesn't DSolve output a solution in a nice format? DSolve[y'[x] == (x + y[x] + 3)^2, y[x], x] ...
3
votes
2answers
143 views

How to make an organised investigation of branch cuts from a solution to a differential equation

I am attempting to solve two differential equations. The solution gives equations that have branch cuts. I need to choose appropriate branch cuts for my boundary conditions. How do I find the correct ...
1
vote
1answer
361 views

NDSolve error (not a real number when the arguments are?)

For the NDSolve, I have problem. It seems to be non-zero imaginary part of the number. How can I get over this issue? The following is the script. ...
4
votes
1answer
481 views

Orbit followed by a particle around Schwarzschild Black Hole

The following is a equation which describes various possible orbits of a particle around the Schwarzschild black hole spacetime in general relativity. I want to solve it from ...
1
vote
0answers
162 views

Chop intermediate results of NDSolve after each step [closed]

Using NDSolve for a set of three ordinary differential equations, I ran into the problem that intermediate results quickly develop negligible imaginary parts. I get ...
0
votes
2answers
1k views

Bifurcation with a system of equations

I'm trying to plot a flip bifurcation diagram for a dynamical system of equations as follows: x'[t] == v[t] v'[t] == x[t] - A x[t]^3 + R*Cos[ω*t] - B v[t] but am ...
1
vote
0answers
86 views

Instructing DSolve not to return answers with explicit complex numbers

DSolve sometimes returns solutions containing explicit complex numbers, even though the ODE does not. For instance (drawn from question 126072), ...
6
votes
2answers
320 views

Second order differential equation of a complex function

I am curious about whether Mathematica can help me solve a second order differential equation of a function in the complex plane. The equation that I am looking to solve is: $\dfrac{d^2}{dz^2}(u+iv) ...
2
votes
1answer
207 views

FiniteDifferenceDerivative of complex function in 2D--bug?

I want to compute partial derivatives of complex functions via finite difference approximation on two dimensional grid using NDsolve`FiniteDifferenceDerivative ...
9
votes
1answer
436 views

NDSolve for complex BVPs and FindRoot

NDSolve works for complex valued ODE initial value problems (IVP). However, for a simple boundary value problem (BVP) with complex coefficients it fails: ...
1
vote
1answer
428 views

NDSolve for complex variables

I am trying to simulate a multiple pendulum system with damping as follows: ...
2
votes
3answers
283 views

NDSolve and differentiation of Abs

I have found several questions about the derivative of Abs and how it is not defined in the complex plane. What I have not found yet is a precise and simple ...
7
votes
1answer
312 views

Confirming conservation laws for complex valued functions

Consider the nonlinear Schrödinger equation (I would like to do this for a more complicated set of equations, but to gain understanding I'll consider this simplified case) $$A_t+iA_{xx}+i|A|^2A =0,$$ ...
3
votes
0answers
110 views

Solving a differential equation with a complex (independent) varible

I'm trying to plug in complex values in the numerical solutions of ODEs without success. For instance y[I] /. NDSolve[{y'[x] == 0, y[0] == 3}, y, {x, -10, 10}] ...
2
votes
1answer
4k views

Solving a complex-valued differential equation with NDSolve

I am trying to solve $dx/dt=\sqrt{1+(ix)^{1.8}}$ for initial condition $x[0] =-0.9877 + i 0.1563$, where $x$ is a complex variable. I would like to plot the imaginary part of the solution versus the ...
1
vote
0answers
863 views

Differential equations with a complex variable

Is Mathematica able to handle ordinary differential equations where the variable itself is complex? I am looking for solutions of ODE systems of the form $$\left\{ \begin{align} i\frac{da_1}{dt} &=...
5
votes
1answer
2k views

How to plot the solution of a Partial Differential Equation?

My attempt. I need to solve numerically the Complex Ginzburg-Laudau Equation (CGLE): $$ \frac{\partial A}{\partial t}=\epsilon A-(1+i\beta)|A|^2A+(1+i\alpha)\nabla^2A $$ I'm using a uniform initial ...
4
votes
1answer
2k views

Real and Imaginary parts of solutions to a complex linear ODE system

Consider a complex linear ODE system $x'=Ax$, where $$A=\left( \begin{matrix} 0&1\\ -2&-i \end{matrix}\right). $$ One can first find the eigenvalues and eigenvectors using ...
3
votes
1answer
697 views

Differential Equation in Complex Plane and Parametric Plot

I would like to solve $dx/dt=\sqrt{1 + (I x)^3}$, where x is complex, for some initial condition like $1 - 5 I$ and plot the imaginary part of the solution versus the real part. (A somewhat similar ...
1
vote
2answers
938 views

Complex differential equation

I want to solve $dx/dt=\sqrt{(1-x^2)}$, where $x$ is complex. When I solve it by hand and analytically for some initial value and draw the imaginary part versus the real part, I obtain an ellipse, as ...
13
votes
1answer
5k views

Bifurcation diagrams for multiple equation systems

I am interested in constructing a bifurcation diagram for some of my parameters (especially for β and γ) in the dynamical system given in the code below. I want to see how parameter changes affect the ...