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

learn more… | top users | synonyms

2
votes
1answer
312 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
187 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
298 views

How do I find the best fit?

I am trying to solve following system of three differential equations ...
2
votes
1answer
389 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
422 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
167 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
236 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
115 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
184 views

Using new symbol in WhenEvent in NDSolve

This is an example in Mathematica's help document. ...
1
vote
1answer
172 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
771 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
283 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
177 views
1
vote
2answers
372 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: ...
-3
votes
1answer
200 views

NDSolve doesn't solve my system of ODEs

What is causing the error in this code? ...
0
votes
2answers
270 views

Autonomous equations' critical points and eigenvalues

I have three-dimensional autonomous equations and want to find their critical points and corresponding eigenvalues. They have 6 critical points each. x, ...
0
votes
0answers
179 views

How can I solve my non-linear ODE?

DSolve[{-x^2 + y[x]^2 - 2 x*y[x]*y'[x] + 2*x^2 *y'[x]^2 == a^2}, y[x], x] DSolve is returning the input statement unevaluated. ...
3
votes
1answer
270 views

How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?

I want to solve two coupled equations with NDSolve, ...
17
votes
2answers
2k views

How to fit 3 data sets to a model of 4 differential equations?

I'm a biologist and a newbie in Mathematica. I want to fit three data sets to a model consisting of four differential equations and 10 parameters. I want to find the parameters best fitting to my ...
8
votes
1answer
406 views

Complex valued 2+1D nonlinear PDE using NDSolve

I am trying to follow the main ideas presented in this question, applying it to my own problem, which is a complex, time-dependent, nonlinear PDE: $$i \frac{\partial \psi}{\partial t} = \left[ ...
6
votes
1answer
245 views

solve ODE with divergencies

The solutions of the second order differential equation $$\frac{1}{\eta}\frac{d}{d\eta}\left(\eta \frac{df}{d\eta}\right)+\left(1-\frac{s^2}{\eta^2}\right)f-f^3=0$$ is shown in Fig. 5.2 below, for ...
2
votes
0answers
62 views

Are FEM methods integrated in NDSolve yet? [duplicate]

About a year ago there was a discussion on these forums as to whether FEM methods have already been integrated into NDSolve in Mathematica. The answer back then was ...
4
votes
0answers
822 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 ...
5
votes
1answer
163 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: ...
3
votes
1answer
474 views

How to increase Maximum number of steps in any other functions except NDSolve?

I want to plot an output response from a state space model. I use StateResponse[] to calculate it and then plot it. When I run my code, I face this message: ...
22
votes
2answers
1k views

Complex valued 2+1D PDE Schroedinger equation, numerical method for `NDSolve`?

Based on the heat equation of the Mathematica Manual tutorial, I wrote the complex counterpart (Schroedinger) equation, for the free particle propagation of an initial wavepacket. ...
1
vote
4answers
279 views

Calculating difference ratios (Δβ/Δρ) from a data set

I am little bit confused about how to calculate δβ/δρ value if I have set of values like this. I have the values of β and ρ like this. ...
16
votes
2answers
2k views

Elegant way of obtaining the envelope of oscillating function [duplicate]

I am solving a differential equation numerically and the output is an oscillating function with the amplitude of the oscillation decaying in time. I would like to extract the power law governing this ...
4
votes
1answer
688 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 ...
6
votes
1answer
221 views

Specifying mesh in NDSolve

I am trying to solve a system of one-dimensional two-point boundary-value problems with NDSolve. I would like use a fixed mesh (specified by me) in the calculation. Is there a way to do this? The ...
0
votes
0answers
242 views

DSolve expression doesn't evaluate

Can Mathematica solve $\; d^2/dx^2{}+ (1/x) d/dx\;$ form of equations? For example, I am trying to solve the system of equations given below: ...
1
vote
1answer
371 views

BVP - shooting method

I really don't know how to realize this method. The examples in internet and the reference aren't helpful for me. 1) I have the values for today: ...
1
vote
0answers
251 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 ...
-7
votes
4answers
450 views
2
votes
1answer
200 views

boundary problem

I have some conditions at t=0, like r1^2+r2^2=0.5 and x^2+y^2=6 and I want to find the right ...
1
vote
1answer
110 views

Using Dot Product with InterpolatingFunctions

I am using NDSolve on a vector function $\mathbf y'(x)=f[\mathbf y(x)]$ with initial condition $\mathbf y_0$, where the dimension of the vector should be user-defined. ...
4
votes
1answer
213 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 ...
1
vote
0answers
294 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 ...
2
votes
1answer
635 views

How to take the derivative w.r.t. an arbitrary function?

EDIT: The answer posted by @Jens works for built-in functions only. However I'm starting to wonder if this is related to my Mathematica install somehow. I have version 7. Here is an example in the ...
5
votes
1answer
221 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. ...
0
votes
1answer
571 views

Solving coupled eigenvalue differential equations

I am trying to solve an equation of the form as follows $\left(\begin{array}{cc} -\frac{\hbar^{2}}{2m}\frac{\delta^{2}}{\delta z^{2}}+\sin^{2}\left(z\right) & z\\ z & ...
4
votes
2answers
774 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.
2
votes
1answer
190 views

Unresolved differential equation [closed]

Why can't Mathematica solve this equation as stated? ...
0
votes
0answers
104 views

Non-Solvable PDE?

I would like to know whether this PDE is solvable and if yes, for which values of $a$. ...
0
votes
0answers
127 views

Integrating and plotting pde system solution

I have a trouble with plotting a pde system solution. I'm solving a PDE system in 2-dimensional space and then I want to integrate the solution along one dimension and build a log plot along the ...
5
votes
2answers
467 views

How to graph a series of coupled oscillators and watch the wave move along them

Here are the differential equations that set's up the 11 coupled oscillators. ...
0
votes
1answer
402 views

Parametric Plot of coupled differential equations

I am able to plot a graph of all the differential equations, but I'd like a parametric plot of each individual one. Here is what I have so far. ...
10
votes
1answer
264 views

WhenEvent and partial derivatives

Can WhenEvent be used to reset the conditions on a PDE at a given time? How would the syntax of that be? This is the code I`m using ...
6
votes
2answers
1k views

Finding y given x from an interpolating function

I would like to put a dot on the point of a curve that has a specific y value but I don't know the x value. A simple example of my code is ...
3
votes
1answer
582 views

Monitoring the Evaluation of NDSolve: time to finish estimation

My problem is quite simple: I run a NDSolve with a system of many ODEs, a calculation that will run for many hours, and I would like to know the progress of the ...