Tagged Questions

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

learn more… | top users | synonyms

2
votes
1answer
320 views

Avoiding zero (empty set) solution with NDSolve

I'm trying to use NDSolve for a chemical kinetics equation where the rate of conversion is given by this relationship as typed in Mathematica: ...
2
votes
0answers
404 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. ...
5
votes
0answers
250 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 ...
4
votes
3answers
323 views

Plotting the direction field of a differential equation

I have to sketch the direction field for the following differential equation: $$\frac{dy}{dx}=\frac{-0.02 y +0.00002 xy}{0.08 x-0.001xy}$$ This is the code I used, which gives an incorrect plot: ...
1
vote
2answers
126 views

NDSolve error---equations expected [closed]

I keep getting an error trying to used NDSolve for three coupled equations. It works in another programming language, but I am having trouble apparently writing it ...
2
votes
0answers
206 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
1answer
547 views

Nonlinear least squares

I have a typical nonlinear least square problem and it seems very similar to the example provided in the section on parameter fitting at the Wolfram website. Unfortunately I always get some error ...
3
votes
2answers
500 views

FindFit for a differential equation model with multiple variables?

I'm trying to figure out how to use FindFit with a multivariable differential equation model and data. I've successfully made it work for the one-variable version ...
2
votes
1answer
163 views

NDSolve much slower when using InterpolatingFunctions inside

I am solving an ODE system with Mathematica. Let's say the system is of the form (to simplify). ...
3
votes
2answers
194 views

DSolve vs a system of differential equations

I'm trying to solve a simple system of differential equations. ...
0
votes
0answers
114 views

Solve differential equation with undetermined constants making the assumption that the constants are positive

I want to solve: eqn = D[f[w], {w,2}] + (3/2 c^2 k Exp[c w] - 9/4 c^2 k^2 Exp[2 c w]) f[w] + m^2 f[w] sol = DSolve[eqn == 0, f[w], w] with the assumption ...
0
votes
0answers
200 views

Defining extra boundary conditions for NDSolve?

I have a second order reaction / diffusion type ODE of the form $\frac{D_{o}}{r^2} \frac{d}{dr}\left(r^2 \frac{dC}{dr} \right) - \frac{aC}{C+k} = 0$ where $a, k$ and $D_{o}$ are constants and $C$ is ...
-1
votes
1answer
181 views

Linking two differential equations

The solution and plot of the Differential equation is $\frac{d^2S(r)}{dr^2}+\frac{1}{r}\frac{dS(r)}{dr}-S(r)+3S^3(r)=0$ ...
-1
votes
1answer
411 views

plotting the solutions of system of differential equations [duplicate]

The following code include the system of differential equations: ...
1
vote
1answer
179 views

Dsolve too slow — is there anyway around?

I am trying to solve: ...
3
votes
1answer
241 views

Modelling the effect of a structure on a “tsunami” (hyperbolic wave equation)

So, the hyperbolic wave equation can be quite easily solved in Mathematica like this: ...
2
votes
2answers
199 views

How to pick out specific parts of the solution of a differential equation efficiently?

I'm trying to solve a set of differential equations (in parallel) and then select specific parts of the solution. What I have at the moment (see below-I've simplified the differential equations, in ...
2
votes
1answer
72 views

Incorrect information displayed when slider is moved (intermittent)

All, the following code graphs 10 different solutions for a first order ODE and allows the user to modify certain equation parameters to see how the graph is affected: ...
4
votes
2answers
492 views

DSOLVE for tenth order boundary value problem

I am currently using Mathematica 9 to find solutions for higher order ordinary differential equations. The following was my input for a tenth order boundary value problem (BVP): ...
2
votes
2answers
491 views

How to generate 2D FEM mesh in Mathematica?

To generate 3D mesh TetGen can be easily used. Are there similar functions (or a way to use TetGen) to generate 2d mesh? I know that such functionality can be easily implemented but I would like to ...
6
votes
2answers
408 views

Only final result from NDSolve

Finally I started to play with differential equations in Mathematica. And I have faced the problem, which seems too me so basic that I'm afraid this question is going to be closed soon. However, ...
0
votes
0answers
296 views

Plot basins of attraction using separatrices for particular pendulum

How can I plot the stable and unstable separatrices to make a graphic of the basins of attraction of this differential equation? ...
2
votes
1answer
288 views

Use output of NDSolve as an integration limit of NIntegrate

I've been working on a ODE, for a function y[t], that, due to it's complexity, has to be solved numerically. I then need to use the results of NDSolve, which I ...
3
votes
1answer
279 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 ...
6
votes
1answer
510 views

Modelling a Rocket Launch using NDSolve

I'm trying to model a rocket launch with Mathematica but I've run into a little problem since I don't know how to turn the thrust off. I'm using Newton's Law of Universal Gravitation plus an added ...
4
votes
1answer
230 views

Create ParametricFunction object without ParametricNDSolve

Documentation of v9 states that ParametricFunction is generated by ParametricNDSolve and ...
0
votes
1answer
491 views

Bifurcation diagrams for system of equations

I am interested in constructing a bifurcation diagram for parameter a in the dynamical system given in the code below. I want to see how parameter changes affect the stability of the system. The ...
0
votes
1answer
384 views

Can graph interpolating function, but not use it. Any thoughts?

When solving a system of differential equations numerically, I get two interpolating functions. I can graph both of these, but when I try to evaluate either of the functions at a point, it just spits ...
0
votes
2answers
178 views

Interpolating a ParametricFunction

Original domain of my independent variable t is 0 to 10 nanometers, but in Mathematica (as in most numerical software), it's good idea to solve differential ...
0
votes
0answers
253 views

NDSolve for a large system of coupled (complex valued) ODEs

The system under consideration here is a generalization of the one I discussed in this problem. Qualitatively, I am trying to solve a system of coupled nonlinear (up to order 4 in the dep variables) ...
4
votes
1answer
247 views

Changing a wave simulation

I want to adjust some code that I found on this Wolfram Demonstration: http://demonstrations.wolfram.com/WaterRipplesPassingThroughASlit/ Basically it shows a wave passing through a single slit. I ...
3
votes
2answers
363 views

Ploting a 3D vector field using Manipulate, VectorPlot3D and NDSolve

My aim is to plot a vector field of the following system with a few trajectories: $$r'(t)=i-l.r(t)-\text{ux}. r(t). x(t)-\text{uy}. r(t). y(t) \\ x'(t)=\text{ex}. \text{ux}. r(t). x(t)-\text{mx}. ...
4
votes
0answers
311 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 ...
1
vote
1answer
682 views

3D Phase Portrait with direction fields and sample solution curves [duplicate]

I have seen NDSolve and ParamtericPlot3D used for things like the Lorenz Attractor, but was wondering if there is a way to draw a 3D phase portrait for a system. Something akin to this: ...
1
vote
0answers
176 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
1answer
502 views

Problem in solving PDE

I have a problem in solving a type of PDE. The actual problem involves diffusion and adsorption in a trench, but here is a simpler example. I have two independent variables $t$ and $x$. There are two ...
2
votes
1answer
274 views

Limitations of ParametricNDSolve family w.r.t objective functions

Observation: I can see even for very simple modification in case of an scalar objective involving an definite integral in time ParametricNDSolve fails. Here is an ...
4
votes
1answer
184 views

How to demonstrate lack of stability with advection equation

I am trying to that using a coarse grid with an explicit method for, say, the advection equation leads to an unstable solution. The trouble is Mathematica avoids unstable solutions with good ...
3
votes
2answers
291 views

How do I find the best fit?

I am trying to solve following system of three differential equations ...
2
votes
1answer
357 views

Crank-Nicolson with NDSolve?

As far as I understand, the Crank-Nicolson method (a.k.a. trapezoidal method) can be expressed as a second order implicit Runge-Kutta method. It's Butcher tableau is: ...
0
votes
2answers
393 views

Manipulating differential equations

I would be very grateful if anyone could help with manipulating the solution to the system of differential equations below. I've tried just about everything I can think of all to no avail. The code ...
2
votes
0answers
159 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. ...
3
votes
1answer
233 views

Utterly confounding behaviour in Mathematica 9 DSolve

I've been baffled by a lot of the behaviours of Mathematica 9 — so much that I regret upgrading my copy of Mathematica 8 (I would downgrade but I'm currently on vacation). Here is an example: ...
1
vote
1answer
112 views

Incorporating a Manipulation in an Animation

I am having trouble incorporating a manipulation into my animation. I want to be able to maniuplate the 5 constants at the beginning. Am I going to need to combine all of the code into one string? ...
1
vote
1answer
178 views

Using new symbol in WhenEvent in NDSolve

This is an example in Mathematica's help document. ...
1
vote
1answer
170 views

How can I eliminate $x_1$ from my two ODEs?

How can I get Mathematica to eliminate $x_1$ in the equations in the first box to achieve the equation in the second box? My code: ...
2
votes
1answer
690 views

DSolve doesn't find a solution

I have this partial differential equation (G and M are constants): and a solution is: Mathematica doesn't find any solutions. My code for DSolve is: ...
7
votes
2answers
270 views

Adding a constant vector to a vector differential equation seems to break NDSolve. Why?

I'm trying to solve a differential equation that's phrased in terms of matrices and vectors. My minimum working example is this: ...
1
vote
1answer
170 views
1
vote
2answers
316 views

How to define a function based on the output of DSolve? [duplicate]

I would like to define a function based on the output of the following DSolve call: ...