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

learn more… | top users | synonyms

7
votes
0answers
351 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
390 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 ...
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
103 views

Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
6
votes
0answers
126 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] ...
5
votes
0answers
206 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
85 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
343 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
221 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
695 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
66 views

Why do NDSolve and OutputResponse not evaluate non-analytic functions numerically?

test = OutputResponse[TransferFunctionModel[1/(1 + s), s], Exp[-(1/t)], {t, 0, 10}] does not evaluate. If Exp[-(1/t)] is ...
4
votes
0answers
177 views

Modelling Hysteresis with a Differential Equation

I want to implement the bulk ferromagnetic hysteresis model (mostly the Jiles-Atherton Model), see http://drum.lib.umd.edu/bitstream/1903/6043/1/PhD_99-1.pdf page 44 equation (30). The needed ...
4
votes
0answers
280 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
715 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 ...
4
votes
0answers
389 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,\\ ...
4
votes
0answers
108 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
52 views

Error solving third order ODE in version 10. No error in V9. DSolve`DSolveKovacicDump`

This is an ode which is solved with no error in V9, but gives a very strange error in V10. Is this a regression bug? On version 9, the ode is solved with no error ...
3
votes
0answers
173 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
532 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
364 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
44 views

EquationTrekker-like behavior for state space?

EquationTrekker is great for phase space plots, however I want to plot the results of $$\phi '(t)=-b \sin (\phi (t))+g \sin (\Phi (t)-\phi (t))+1\\\Phi '(t)=g y ...
2
votes
0answers
42 views

DSolve breaks when the ordering of independent variables aren't proper?

I encountered this when trying to solve this problem with DSolve: ...
2
votes
0answers
45 views

Apply IC and BCs on Second - Order Linear PDE

I am now trying to solve second - order linear partial differential equation in that interested eq. has been separated into variables to simplify the procedure for Mathematica. Here is my equation; ...
2
votes
0answers
66 views

How to specify initial condition including integral equations in the case of the dirac equations?

Hi I am trying to solve a system of differential equation with NDSolve. The problem is I have like $3$ (maybe $5$) boundary conditions, but only $2$ differential ...
2
votes
0answers
64 views

Locate Blow-up in NDSolve with Whenevent

At some point I get this error: ...
2
votes
0answers
74 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
80 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
57 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
86 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 ...
2
votes
0answers
339 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
173 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
155 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
243 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
251 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
536 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
474 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
178 views

EventLocator with LSODA?

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

Problem with NDSolve in Mathematica 9 / 10

I'm having trouble by solving the following differential equation in Mathematica 9 and 10, where the code works fine in version 7: ...
1
vote
0answers
45 views

solution of differential equation with complex roots

How to find the solution of differential equation with complex roots For example of [{y^2 n[t]+ 2 k y n'[t] + n''[t]= M p sin(o t), n[0]==0, n'[0]==0}, n,t] given k lies between 0 to 1 which makes the ...
1
vote
0answers
72 views

Speeding up NDSolve for system of differential equations

I am wondering if there is a way to speed up this function that solves a system of ordinary differential equations with NDSolve? Thus far I've tried specifying a few different methods such as LSODA, ...
1
vote
0answers
30 views

Compiled NormFunction

I would like to use a user-defined NormFunction with NDSolve, e.g., NormFunction -> (Norm[Take[#, 2], \[Infinity]] &) which says that the infinity norm ...
1
vote
0answers
109 views

How to find a particular solution using NDSolve

I'm looking for a way to find a specific solution to a differential equation. As a simplified version of my problem, here's a similar setup for a simple harmonic oscillator problem. ...
1
vote
0answers
85 views

Solving two-component two-dimensional differential Equation with NDSolve (Brusselator Model)

I'm trying to solve a two-component two-dimensional reaction-diffusion differential equation system with Mathematica. The background of the model is the so called "Brusselator Model" where one can ...
1
vote
0answers
38 views

RSolve works slow and does not give an analytical solution for solving high order linear difference equations

RSolve@@{{a[n]-a[n-10]==101}~Join~Table[a[i+1]==101+10i,{i,0,9}],a[n],n} I want to get the exact form of general formulas, but ...
1
vote
0answers
61 views

Stiffness or Singularity

So trying to run some simulations based on a model I found in literature. I am by no means a Mathematica expert, or a mathematician for that matter. Initial I was getting a ...
1
vote
0answers
116 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
100 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
35 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
78 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
176 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 ...