Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.

learn more… | top users | synonyms (3)

2
votes
2answers
66 views

How to simplify a differential equation?

Now I get a differential equation like this: (-1 + x) (1 + x)^2 == (2 (1 + x^2) (1 + x^4))/(-2 x (1 + x + x F[x]) + (-1 + x^3) F'[x]) I want to get the standard ...
0
votes
0answers
43 views

Check if interpolated function passes through a specified region

Is there an efficient way to check if a curve that was obtained as an Interpolating Function (from solving differential equations numerically) passes through a given region? I am solving for two ...
1
vote
1answer
58 views
3
votes
0answers
64 views

ColorBars or PlotLegends for ElementMeshSurfacePlot3D

I want to produce a colorbar legend to the output from ElementMeshSurfacePlot3D (Mathematica 10). The pde was solved using NDSolveValue (FEM pdesolution is the resulting interpolating function) over a ...
1
vote
1answer
104 views

NDSolve with coupled ODE's and unknown singularities

I have two coupled ODEs that I am trying to solve numerically. It appears that there is a singularity in the solution to the equations which I am unsure how to get past. Both functions $\alpha$ and ...
2
votes
1answer
48 views

Asymptotic Radial Wave Equation

I'm trying to reproduce the following solution to the ODE, $$\frac{d^{2}u}{d\rho^{2}} = \frac{l*(l+1)}{\rho^{2}}u$$ Solution: $$u\left(\rho\right) = C\rho^{l+1}+D\rho^{-l}$$ What I've tried in ...
-1
votes
0answers
68 views

Limitation of MMA in solving complicated functions?

I try to solve nonlinear PDE functions with NDsolve and NDIntegrate in MMA. And it seems that MMA will not work if the functions become too complicated. I do not know why. Below are my codes which ...
13
votes
1answer
106 views

Empty WhenEvent action crashes kernel

Bug introduced in 9.0 and persisting through 10.4.1 WhenEvent is new in 9.0. This is an example from the docs, slightly modified (action is wrapped in ...
0
votes
0answers
41 views

How to use NDSolve for mixed types of several equations?

I have three equations, one is partial differential equation and another two are not. They are just normal algebra equations but coupled with the differential equation. I wanna use NDSolve to get ...
3
votes
0answers
112 views

Mathematica Newmark Optimization

Here is my Mathematica code which implements the Newmark method to solve a equation of motion. The variable "ag" contains the accelerations from an earthquake record. Is it possible to optimize this ...
5
votes
0answers
137 views

Dealing with a nonlinear PDE using FEM

As far as I can see in the Mathematica documentation center, there are no built-in ways for solving nonlinear PDEs using Finite Element Method (FEM). I am dealing with a simple nonlinear ...
0
votes
0answers
43 views

Extract stiffness matrix from NDSolve

I am solving a set of ODE equations with NDSolve with more than 25 equations. I was wondering is there any way Mathematica gives me the mass and stiffness matrices?
3
votes
2answers
52 views

Numerically solving coupled ODE's with a parameter as initial condition

i'm currently trying to numerically solve a set of coupled ODE's to obtain the functions p(r), h(r) and m(r) in the range of r1 <= r <= r2 with initial conditions m(r1)=a=const and ...
0
votes
2answers
68 views

Using an interpolating solution of NDSolve into an algebraic expression

I would like to use the interpolating solution of NDSolve into an algebraic expression without creating a system of a differential equation and algebraic equation. The example is the following, the ...
0
votes
0answers
49 views

How to speed up NDSolve?

I have a program where I need to iterate NDSolve thousands of times for different configurations of a diffusion problem. The thing is, I only need about 3 digits of accuracy. I looked thru previous ...
0
votes
0answers
51 views

Lyapunov exponent of non-autonomous differential equation

I am trying to calculate the Lyapunov exponent for a non-autonomous system using M Sandri code, but it always shows me error "infinite expression 1/0 encountered". Does anyone know about this? Mr. ...
0
votes
1answer
37 views

Find a independent variable value from the numerical solutions of a system of differential equations

I have calculated the solutions for the following system of differential equations using NDSolve ...
6
votes
1answer
148 views

Constrain Locator to specified region

How can I constrain the locator to stay within the region defined by RegionPlot? When the Locator remains within the region, ...
2
votes
1answer
75 views

Does NDSolve iterate faster in a region where the system being solved is in equilibrium?

I was wondering how exactly the time it takes for NDSolve to iterate through a certain region of the domain depends on the local behaviour of the given system being solved. My guess would be the ...
0
votes
1answer
34 views

Trying to solve ODE. Need help with error messages [closed]

With this code I get an error-message: Equation or list of equations expected instead of True in the first argument. Apparently y'[0] == v0 gives ...
0
votes
0answers
69 views

Force NDSolve to use finite difference

How to force NDSolve to use finite difference instead of FEM. I have the following code: ...
0
votes
0answers
48 views

Eigenelements of conductivity equation

I am trying to calculate the eigenvalues and eigenfunctions of the conductivity equation in an annulus. In particular I am looking for $(\lambda, u)$ s.t. $$ \begin{cases} \Delta u = \lambda u & ...
0
votes
0answers
70 views

Boundary conditions for NDSolve

I get the following message: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> from ...
0
votes
1answer
35 views

An unexpected NDSolve behavior [closed]

I observe the following. The code: ...
0
votes
1answer
49 views

Setting Initial Conditions in a System of Differential Equations that don't start at t=0

I have a system of six differential equations (linear for the sake of the discussion). I want to set the initial condition to start at time t=18 and not time t=0. I know the values of the dependent ...
0
votes
0answers
33 views

Solving Time-Dependent PDE's Analytically with no non-trivial Boundary Conditions

I'm having some trouble solving a partial differential equation that is supposed to model the propagation of a scalar field in Schwarzschild spacetime using spherical coordinates. I'm using the DSolve ...
6
votes
0answers
46 views

EventLocator in NDSolve seemingly hogs memory in Windows, but not Mac

I have written a function (ftest in my code) which does the following: Takes a vector {x,vx,vy} as input Numerically solves (with high precision) a specific ...
11
votes
1answer
218 views

NDEigensystem returns incorrect eigenvalues for 2D coulomb problem, eigenfunctions contain discontinuity

I posted a similar question a short time ago regarding the 3D Coulomb problem. Jens' excellent answer to this thread allowed me to obtain the correct eigenvalues and eigenenergies for that system. I ...
4
votes
1answer
73 views

Issues with modeling pulses in a very simple system of DAEs

Some time ago I had asked this question about evaluation difficulties using Euler Integration to solve a system of ODE where discrete pulses occur. While I have now abandoned Euler integration and ...
0
votes
1answer
67 views

How to perform this nth derivative operation in MMA?

I have to solve this following equation where I need to differentiate a function $n$ times. $$A=\sum_{n=0}^{m-1}\frac{s^n}{n!}(-1)^n\frac{d^nf(s)}{ds^n}$$ How to express the above equation in ...
0
votes
0answers
36 views

Recycle boundary condition

I'm having the following issue that can not find a solution , by using this boundary condition u[0, t] == 2 u[1, t] that Mathematica does not understand, someone ...
-1
votes
0answers
21 views

How does d/dx (ln(1/x) + c) = d/dx (c - ln(x))? [migrated]

I have to find the derivative of the following expression ln(1/x) + c it appears the answer is -1/x however i am told it can ...
1
vote
0answers
44 views

Solving ode which solution oscillate violently

This is a ordinary differential equation: y[x]/(-1 + x^4)^2 - ((1 + 2 x^2 + 3 x^4 - 2 x^6) Derivative[1][y][x])/(x - x^5) + Derivative[2][y][x] == 0 I want to ...
0
votes
2answers
83 views

Jump boundary conditions

I'm having the following issue that can not find a solution , by using this boundary condition ...
1
vote
0answers
79 views

How to “INJECT” with holding Evaluation, specifically into a WhenEvent

I am importing a set of differential and stochastic equations from an external package, and want to use Mathematica to analyse this. I am struggling building the set of equations that I can use with ...
0
votes
0answers
39 views

Pass List / Vector argument through NDSolve to a function

I am trying to pass vector or list as argument to the function from NDsolve.And I am getting these error. Also I am pretty new to stack overflow. Apology if this a possible duplicate. Here is my code. ...
1
vote
1answer
39 views

portions of plot missing for a relatively simple function

I am trying to produce a graph of the linear dynamic system response to a step input. The code is as follows: ...
0
votes
2answers
82 views

Free-fall air resistance problem

I´m working on a free fall problem and I got an equation with variable $k$ when the situation has air resistance. Then I compared with no air resistance equation ($-4.9$, considering t variable). So, ...
9
votes
1answer
76 views

How can I identify which solution triggered the WhenEvent?

I am using NDSolve for problems like this: ...
3
votes
0answers
37 views

Constraining Function to be positive with NDSolve, Allee effect

I am trying to numerically solve the steady-state behaviour of the Allee effect (with one spatial dimension, diffusion): $\frac{\partial n}{\partial t} = D \frac{\partial^2 n }{\partial x^2} + ...
3
votes
0answers
77 views

Kernel crashes when computing finite difference mixed derivative with respect to y & z but works fine when computing with respect to x & y or x & z?

I am using Mathematica 10.4.0 on Ubuntu 16.04. I am trying to solve a set of differential equations using finite difference method on an NxNxN cubic grid (x, y, z directions). I am getting a weird ...
5
votes
1answer
73 views

Finding the correct boundary conditions to a specific problem

I want to reproduce the following problem in the figure: $$\phi''+c\phi'\sqrt{m^2\phi^2+\phi'^2}+m^2\phi=0$$ where $\phi=\phi(x)$ with $x \in (-\infty,\infty)$, $c=\sqrt{3/2} \ $ and $m=0.2$. ...
3
votes
2answers
93 views

Switching Differential Equation in NDSolve

I am trying to solve the following system of differential equations using NDSolve: $\dot{z}_t=.5(1-z_t)$ $\dot{y}_t=.05y_t+z_t-x_t$ subject to the following constraint: $-y_t-z_t\le0$ where $z_t$ ...
10
votes
1answer
204 views

NDEigensystem cannot solve numerically the 3D Coulomb problem, while DSolve returns the right answer

After having derived by hand the eigenvalues and eigenfunctions for the 3D and 2D hydrogen atom, I want to solve the systems numerically using Mathematica. I need to do this because my next step is to ...
3
votes
2answers
93 views

Assigning Element Markers to 3D FEM Mesh

I have created a 3D graphic using GraphicsComplex and then use ToElementMesh to generate a 3D Mesh that I want to solve a PDE on, but I cannot figure out how to apply ElementMarkers to the Boundaries. ...
3
votes
2answers
173 views

Solving coupled differential equations with unknown constants

Is it possible to obtain exact solutions of these types of coupled differential equations directly in Mathematica ...
1
vote
1answer
214 views

Solving wave PDE

I am trying to solve the wave PDE with NDSolve. Below is the equation: ...
0
votes
1answer
69 views

Using Neumann boundary conditions

I had a semi-related physics problem I needed to solve analytically (which I have already done), but I am now curious how I would go about numerically solving the entire system in Mathematica. ...
0
votes
1answer
48 views

Epilog not working [closed]

When I run the following code ...