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

learn more… | top users | synonyms

5
votes
1answer
453 views

Unexpected results from NDSolve

I am trying to solve a stiff reaction diffusion system with NDSolve. However, it does not produce the expected results. My problem is a spherical cell with 5 ...
5
votes
1answer
190 views

VariationalD giving the wrong solution?

EDIT: As pointed out in the comments, VariationalD gives a variational derivative (which I don't want), not a derivative with respect to a function (i.e. ...
5
votes
1answer
788 views

Solve system of ordinary differential equations that doesn't have an initial condition (t=0), but has an inifinity condition (t=infinity)?

I have a question for solving t -> Infinity on Mathematica. First, I have a system of ODEs: ...
5
votes
1answer
139 views

Set some Method options for NDSolve globally while allowing others to change

In a code base that is difficult to change for unrelated issues, I have many invocations of NDSolve that look like the following: ...
5
votes
1answer
119 views
5
votes
0answers
191 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
84 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
337 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
220 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
671 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
2answers
660 views

Does Mathematica have a command analogous to ode45 of MATLAB?

Does anybody know if Mathematica has an analogue of MATLAB's ode45 command? I need to solve a second order coupled ODE system of equations.
4
votes
5answers
364 views

Problem using WhenEvent to constrain solution

Note: This question has also been posted at the Wolfram Community Problem: Simulate pressure in volume 1 and 2 for 1 second. The circuit is as follows: From this I set up the governing DE for ...
4
votes
3answers
288 views

Creating a 3D List Line Plot From Discrete Points

Given the following Runge-Kutta ODE solver and the graphical output below, how do I get a 3D line plot instead of a 3D point plot? I see that there is no ListLinePlot3D function, so I thought it might ...
4
votes
3answers
283 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: ...
4
votes
3answers
280 views

How could I get the value of y[t] at each specific interpolation point?

sol = NDSolve[{Derivative[2][y][t] + Sin[y[t]] == 0, Derivative[1][y][0] == 0, y[0] == 1}, y, {t, 0, 2}] the above-mentioned differential equations can be solved ...
4
votes
2answers
360 views

Finding a 3d curve from torsion and curvature with NDSolve

I'm trying to use the Frenet–Serret formulas to find the curve that matches the torsion and curvature I specify numerically with an InterpolatingFunction. The ...
4
votes
2answers
1k views

How do I plot a solution of a differential equation?

I am having trouble generating a plot for a solution to my differential equations. I always end up with just blank axes. ...
4
votes
2answers
2k views

Problem with the DSolve function

OK guys, here's the thing, Mathematica does not return a solution for this system of differential equations: ...
4
votes
2answers
227 views

Error entering equation in DSolve

I entered a command incorrectly as follows: DSolve[{y'[x]=y[x]},y[x],x] I am now experiencing: ...
4
votes
1answer
465 views

Solve inhomogeneous Poisson's equation, gives no result at all

I would like to solve the following two-dimensional inhomogeneous Poisson's equation in Mathematica including specific boundary conditions, and I know that an analytical solution exists, but ...
4
votes
2answers
5k views

How do I solve coupled ordinary differential equations?

I have four coupled ODE's. I am not sure how to plot and solve them using Mathematica. I won't give the exact problem, but the following is something analogous: The equations ...
4
votes
1answer
144 views

Using NDSolve to solve Equation of Motion in cylindrical coordinates

I have a set of coupled differential equations which represents the equation of motion of a particle in cylindrical coordinates with the following Hamiltonian: $$ H=\frac{1}{2m} \left( p_r^2 + ...
4
votes
1answer
102 views

NDSolve`ImplicitRungeKuttaGaussCoefficients doesn't work

I am using Mathematica 9.0 on Ubuntu. I tried the first example from this documentation page, but it returns unevaluated: ...
4
votes
3answers
1k views

Lyapunov Exponent

Does anyone know a (simple) Mathematica code for computing the Lyuponov Exponent for the Rossler System? Thank you Rossler System: ...
4
votes
3answers
503 views

Numerical solution of a differential equation with NIntegrate coefficients

I am trying to solve a linear ODE with a variable coefficient which is given in terms of an integral I can only do numerically. That is, I have an equation of the form $$ ...
4
votes
1answer
730 views

Evaluation of a Variable Coefficient PDE

I am trying to render the solution of the following partial differential equation: $$ u = u(x,y)~;\quad \frac1{x^{2/3}}\partial_xu + x^3\partial_yu + \partial_y^2u + \partial_x^3u = 0 $$ ...
4
votes
1answer
173 views
4
votes
1answer
188 views

My mistake or error in NDSolve?

I try to solve the following equation $$y'=y-2ye^{-0.8y}, \quad y(0)=0.7.$$ By some aruments I expect to have a positive solution $y(t)\geq0$, for all $t>0$, however, NDSolve shows that starting ...
4
votes
1answer
363 views

NDSolve problem with matrix valued function

I got a strange problem when using NDSolve to solve a matrix value function σ[t] = {{σx[t], σxy[t]}, {σyx[t], σy[t]}} when I ...
4
votes
1answer
501 views

Can DSolve solve systems with unspecified function coefficients?

I am an economic research student with no previous experience with Mathematica, so please pardon me if my questions sounds really stupid. I am hoping to solve a system of nonlinear ODEs symbolically. ...
4
votes
1answer
838 views

Incorrect solution of diffusion equation with Neumann boundary conditions

I want to set up a PDE model, which takes a two-dimensional diffusion equation into account. The key problem is that I have some trouble in solving the two-dimensional diffusion equation numerically. ...
4
votes
1answer
672 views

MaxSteps and Computing time issue for Solving Differential equation in Mathematica

When we solve differential equation numerically using NDSolve then sometimes we get error like NDSolve::mxst: Maximum steps reached According to Mathematica docs ...
4
votes
1answer
136 views

Solving a nonlinear, second order d.e. in Mathematica

I am trying to solve the following differential equation $$ s''(x) = \frac{8}{9}s(x) -2s^2(x) + s^3(x), $$ with boundary conditions $s(-30) = 4/3 $ and $s(30)=0$, in Mathematica by using the following ...
4
votes
1answer
92 views

How to use WhenEvent with a vector ODE in NDSolve

I have an ODE system I'd like to specify as a vector equation in NDSolve. I'm not clear on how to use WhenEvent for a system ...
4
votes
2answers
106 views

Non-convergance of the solution of the 1+1 partial differential equation

I am stacked with a partial differential equation as follows: This is the $\LaTeX$ expression for the equation $$ \frac{\partial y}{\partial t}=\frac{\partial^2 y(x,t)}{\partial x^2} ...
4
votes
1answer
248 views

Using a user defined NormFunction in FindFit or NDSolve

I would like to use a different norm instead of the 2-norm in FindFit (Mathematica 9). For example, instead of using $$\sqrt{\sum (x_{\mathrm{model}} - ...
4
votes
2answers
423 views

WhenEvent in NDSolve

How come this doesn't work as I intended? ...
4
votes
1answer
135 views

Ordinary differential equation invloving the function composition

I want to solve the following function: DSolve[(A1*Exp[B1*f[x]] + A2*Exp[B2*f[x]])*f'[x] == A1*Exp[B1*x] + A2*Exp[B2*x], f[x], x] And this is what I get as an ...
4
votes
2answers
437 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): ...
4
votes
2answers
190 views

Problem with adding vector to symbolic function (for NDSolve)

I'm trying to set up a system of differential equations for passing to NDSolve. Note that my initial conditions are vector valued so Mathematica should know that ...
4
votes
1answer
106 views

How can I highlight the vanishing-partials in an interactive 3D plot?

I am using Manipulate and Plot3D to plot a function with two real variables and two extra parameters. ...
4
votes
1answer
871 views

How do I find the best parameter to fit my data if the model is a interpolating function?

Hi I have a question regarding to find the best parameters for my model to fit my data. I have 3 ordinary equation, and I now just picked some parameters (...
4
votes
1answer
173 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 ...
4
votes
1answer
323 views

Eliminating functions from system of PDE in Mathematica

Mathematica users, Let's see an example of three PDEs: How can I eliminate variables q1[x,y,z] and q2[x,y,z] from a system of ...
4
votes
2answers
705 views

How to Solve this ODE with Mixed Boundary condition

I have an ODE equation which is sort of y''[x] + 2 y'[x]/x + .0001 (y[x])^3 ==0 subject to the boundary conditions ...
4
votes
1answer
111 views

NDSolve - sampling for result during the computation

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^{-9}$). An example ...
4
votes
2answers
217 views

How to transform transfer functions into differential equations?

is there a way with Mathematica to transform transferfunctions (Laplace) into differential equations? Let's say I have the transfer function $\frac{Y(s)}{U(s)}=\text{Kp} \left(\frac{1}{s ...
4
votes
1answer
129 views

WhenEvent method with 3 conditions

I am trying to solve system of differential equations below $$x''(t)=-2.25cos(1.5t)-x(t)-x'(t)$$ $$y''(t)=-1.125cos(1.5t)-4y(t)-y'(t)$$ $$z'(t)=\begin{cases}x(t)-(1+y(t)), & \text{if } ...
4
votes
1answer
206 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 ...
4
votes
1answer
417 views