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

learn more… | top users | synonyms

7
votes
0answers
280 views

NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
7
votes
0answers
2k views

Integro-differential equation

I have to numerically solve a nonlinear partial integro-differential equation using Mathematica. This is my equation, $$\frac{\partial y(x,t)}{\partial t}=\int_{-\infty}^\infty K_0(|x-u|) ...
6
votes
0answers
110 views

Possible bug with FourierTransform linearity

Each component is easily transformed but the sum is not: FourierTransform[f''[x], x, k] FourierTransform[f'[x], x, k] ...
6
votes
0answers
351 views

Numerically solve 2nd order differential equation with singularity

Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example: $$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$ where ...
5
votes
0answers
159 views

NDSolve and memory usage

After some googling, i've found similar problems around, but didn't find a 100% satisfactory answer, so let me ask here: I'd like to solve a 1+1 problem using the method of lines. In spherical ...
5
votes
0answers
80 views

Modify NDSolve`StateData (if possible)

I am trying to solve a PDE that needs to be scaled constantly (refer to this). @andre suggests I modify NDSolve`StateData. Now, the problem is, I'm not used to ...
5
votes
0answers
322 views

Modeling neural excitation with a non-linear differential equation

I think I have a special problem and I am not sure how to search for an answer, so I thought I would try here. I am working with the so called FitzHugh-Nagumo model which describes very simple ...
5
votes
0answers
214 views

Second-Order Feedback Pathways

I'm relatively new to Mathematica and I've tried searching and reading through the Mathematica documentation but I'm not able to find a good place to start. I want to model a simple, second-order ...
5
votes
0answers
602 views

Controlling the time step in NDSolve?

I generally use NDSolve for stiff non linear partial differential equations of 4th order. I find that a BDF1 method generally does well to placate my beast of a PDE. I've also tried out ...
4
votes
0answers
233 views

NDSolve: ProcessEquations and Reinitialize with Piecewise functions

I am having trouble with using NDSolve`Reinitialize when the system consists of a pieceise function. If we define the ODE system ...
4
votes
0answers
621 views

Numerically solving system of partial differential equation

I am trying to solve a system of partial differential equation with boundary conditions. But I got an error message saying NDSolve::icfail: Unable to find initial ...
3
votes
0answers
141 views

Numerically solving a system of PDEs where one function is composed with the other

I'm trying to solve the following system using NDSolve: $$ \begin{align} u_t(x,t) &= u_{xx}(x,t) - v(x,t) \\ v_t(x,t) &= u(v(x,t),t) \end{align} $$ with ...
3
votes
0answers
210 views

Transform recursion for coefficients into differential equation for generating function

Assume, one is given a linear recursion with polynomial coefficients for a sequence $(a_i)_i$, such as a[i] == i a[i-1] I would like to convert this recursion ...
3
votes
0answers
408 views

Using NDSolve for Integro-Differential Equations

I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are: ...
3
votes
0answers
329 views

Kalman filter by hand

I am now learning the Kalman filter and wants to implement it by hand to understand it better. To be specific I want to first simulate a sequence of data by $$ \dot x=Ax+Bw\\ y=Cx+Dv,\\ ...
3
votes
0answers
101 views

Symbolic solution to ODE, pure InverseFunction not evaluated

I'm new to Mathematica and I don't understand why in the solution of the following ODE, the #1 in the pure function is not immediately replaced by the corresponding ...
3
votes
0answers
325 views

Numerically solving PDE with high precision

I want to numerically solve the PDE $\partial_t u(t,x)=c\partial_x u(t,x)+(mx-l)u(t,x)$ with some initial and boundary conditions and given parameters $c$, $m$ and $l$. Consider the code ...
2
votes
0answers
50 views

Understanding of method for NDSolve

I used automatic method for NDSolve. Then I asked myself - which method Mathemathica prefered? I got an answer for this question on this forum, that I need to use: ...
2
votes
0answers
51 views

Locate Blow-up in NDSolve with Whenevent

At some point I get this error: ...
2
votes
0answers
56 views

Are there some other ways to solve a second PDE except DSolve?

I have a partial differential equation as follows: $$\frac{\partial p(x,t)}{\partial t}=\text{Dp} \frac{\partial ^2p(x,t)}{\partial x^2}-\frac{p(x,t)-\text{p0}}{\tau }$$ What I try to do was to get ...
2
votes
0answers
52 views

Internal Shooting Method of NDSolve in combination with NDSolve`Reinitialize?

To explain my problem, I am trying to extend the BVP problem example from the help that illustrates how to use the shooting method of NDSolve: ...
2
votes
0answers
44 views

Understanding NDSolve::ndsz

I'm working on a largeish system of differential equations where I encounter the NDSolve::ndsz step size is effectively zero; singularity or stiff system suspected ...
2
votes
0answers
150 views

Using FindFit to fit nonlinear ODE parameters, subject to a constraint (an inverse problem)

Similar to this post I am finding that constraints tend to make FindFit poor at finding a good fit. However, unlike the previous post, the constraints are required ...
2
votes
0answers
240 views

Solving a diffusion equation

I need to solve a particular diffusion equation with NO boundaries http://astronomy.nju.edu.cn/~chenpf/c/courses/fluid/pringle81.pdf equation (2.10) with nu = cost. ...
2
votes
0answers
148 views

NDSolve Issue with initial conditions

I am trying to implement a Poincare section for a gravitational movement on the plane $(x,y)$. Here is the code I wrote ...
2
votes
0answers
141 views

Using WhenEvent for derivative of discontinuous function

I have a discontinuous function ($u(t)$, a square wave) and I would like WhenEvent to trigger when the signal goes high/low, i.e. when the value of $u(t)$ changes. ...
2
votes
0answers
196 views

Conditional statements in intial conditions?

This is potentially a daft question, but I thought I'd ask it; I have some material free to diffuse in a boundary between rn and ro; I've been able to get it working nicely for neumann type boundary ...
2
votes
0answers
216 views

differential equations with implicit functions

I have an ordinary differential equation that contains coefficient functions that depend implicitly on the independent variable via an algebraic equation. I am trying to go ahead and use NSolve to ...
2
votes
0answers
444 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
2
votes
0answers
399 views

Inconsistent boundary and initial conditions: BC ignored altogether

Consider the following diffusion-decay equation with von Neumann b/c in the origin and Dirichlet at the other boundary: ...
2
votes
0answers
162 views

EventLocator with LSODA?

Is the EventLocator option not compatible with LSODA on NDSolve. Below is what I tried to do ...
1
vote
0answers
89 views

Runge-Kutta-2 on System

After spending some time using the Mathematica documentation and this Mathematica.SE answer, I implemented the Runge-Kutta-2 routines. I am hoping someone can validate what I did and tell me that it ...
1
vote
0answers
58 views

BVP system of nonlinear coupled ODEs

Here I am, trying to solve this system of coupled ODEs (up to a minus sign): $ u''=6u^5-(8+4a)u^3+(2+4a)u+\frac{2u((w^2-s)^2+bw)}{(u^2+c)^2}$ $ w''=\frac{4w^3-4bw+b}{u^2+c}$ with the boundary ...
1
vote
0answers
30 views

How to find discretezation error of NDSolve

Is there a way to find out how large the truncation, round-off, and other errors that occur from discretizing a differential equation are while using the default settings in NDSolve? Or would I have ...
1
vote
0answers
58 views

ExpToTrig transforms solution to 4th order ODE into unwanted form

Mathematica gives the solution of the second order differential equation DSolve[a y''[x] + b*y[x] == 0, y[x], x] in trigonometric form ...
1
vote
0answers
166 views

Complicated condition for system of differential equation

I am trying to solve a series of nonlinear differential equation with complex condition as described by block diagram below. The left figure describes general concepts and the right figure describes ...
1
vote
0answers
64 views

No response from DSolve

Using optimal control theory, I am trying to find the optimal paths of d and k such that they will maximize profit as given by lc: ...
1
vote
0answers
141 views

DSolve 2nd Order Coupled Partial Differential Equations

I am trying to use Mathematica to solve 2 coupled differential equations. My equations are of the form \begin{equation}\ddot{x}_i + A_{il} \partial^l A^{jk} ( \dot{x}_b \dot{x}_c - y_b y_c ) =0 ...
1
vote
0answers
204 views

Differential equations: How do I solve a delay differential equation with 0-1 variables

How do I solve the following non-linear, delay-differential equations using Mathematica under the assumptions $$p(t) = 1 ,\; y(t) > k$$ $$p(t) = 0,\; y(t)<= \ k$$. $$ \frac{dw}{dt} = ...
1
vote
0answers
115 views

Plotting basin boundary

How to plot the basin boundary in Mathematica? I have been trying to do this using the system ...
1
vote
0answers
153 views

What am I doing wrong when using DSolve

I'm trying to solve a simple PDE in Mathematica. I just can't get Mathematica to give me an explicit analytical solution. This is the code that I made and it basically repeats in the output what I ...
1
vote
0answers
74 views

How to solve system of differential equations of arbitrary order (symbolic tensors)?

I am interested in solving systems of ODEs symbolicly, keeping things with arbitrary dimensions for clarity. For example, assume that $x, f(x) \in R^N$ and $A \in R^{N \times N}$, how do I solve ...
1
vote
0answers
106 views

parameter NDSolve

the question I need to solve is: t x'[t] == -x[t] + y[t], t y'[t] == -5 t^2/x[t]^2 + x[t] - y[t], x[1] == 4, x[b] == 1 in order to solve the coupled ...
1
vote
0answers
119 views

NDSolve error when solving pde

I am trying to calculate speed of viscous fluid in a rotating hollow sphere. The sphere is rotating round z axis. The fluid is incompressible. I used Navier-Stockes equations. The only boundry ...
1
vote
0answers
145 views

Jumps in NDSolve results

I need to compute using NDSolve routine, some function $F(x)$, having two possible values $F_1(x)$ and $F_2(x)$ depending on whether the argument exceeds some ...
1
vote
0answers
165 views

Having Mathematica solve or help solve a set of 8 equations

There is a set of DDE's that arise in leukemia dynamics and I'd like to find the equilibrium points of the system by setting all of the derivatives equal to zero. The system can be described in ...
1
vote
0answers
195 views

Why is a bump function making NDSolve take forever to solve?

I am attempting to solve a system of relatively complicated elliptic PDEs via a relaxation technique. In particular, I am trying to solve $\textrm{div} LW = S$ where $S$ is some vector and $L$ is the ...
1
vote
0answers
173 views

Change of coordinates for an InterpolatingFunction

This is a toy example of the question I have but I think it illustrates the point. I have a function y[x] which is an interpolating function. Let's define it ...
1
vote
0answers
477 views

NDSolve: methods and step size choosing

I am looking into the documentation of NDSolve[]; more precisely how this function chooses the StepSize and how it chooses which ...
1
vote
0answers
220 views

Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations

I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...