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

learn more… | top users | synonyms

0
votes
2answers
485 views

How can I suppress message “… cannot be used as function”?

I'd really appreciate your help. The code gives me a solution, but in the end it says it cannot be used as function, which is not true. Script: ...
0
votes
1answer
169 views

Solving a differential equation for a variable in a function

This may sound like a very trivial question, but I need to solve a differential equation as follows: ...
0
votes
1answer
680 views

Steady states and eigenvalues for a non-linear system:

I am trying to understand a non-linear system of equations, and find their steady states and dynamics. I am noob to understanding Mathematica (I am using version 6, but I have access to the latest ...
1
vote
1answer
428 views

Problem using NDSolve

This might be some simple mistake, but I am running out of ideas. I am trying to fit an ODE system to some data. This error keeps appearing NDSolve::nlnum: "The function value {0.299812 - ...
11
votes
3answers
3k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t) $$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so ...
2
votes
1answer
264 views

ParametricPlot3D doesn't appear

Here I have one simple system solvable with NDSolve. I don't know why ParametricPlot3D doesn't present trajectory in space. I have solutions for x[t], y[t] and z[t] ...
0
votes
1answer
348 views

Applying l'Hôpital's Rule to NDSolve with Piecewise Function

OK, so I've been working on this problem for over a week and it's driving me crazy. I'm trying to solve a system of two differential equations in $x(t)$ and $y(t)$ using a "time-elimination method," ...
4
votes
1answer
111 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. ...
1
vote
2answers
634 views

Weird NDSolve behavior with Piecewise (MMA9)

NDSolve in Mathematica 9.0.0 (MacOS) is behaving strangely with a piecewise right hand side. The following code (a simplified version of my real problem): ...
1
vote
1answer
642 views

How to calculate a gradient at x=0?

I am solving a second order differential equation for n[x]. I solved it with both DSolve and NDSolve. A plot of n as a function of x looks great. Than I want to calculate a gradient of n[x] at a ...
1
vote
1answer
265 views

Troubleshooting an NDSolve::ndfdmc error message

Τhe following code ...
1
vote
2answers
533 views
1
vote
1answer
160 views

Solving a system consisting of an ODE and a non-differential equation

I would like to solve the following system of equations: y'[t] == x[t]*y[t] - x[t]; 10 == x[t]*y[t]/(x[t] + y[t]) + x[t]/(x[t] + y[t]^2) Is there any way to ...
2
votes
2answers
315 views

Solving and plotting ODEs while varying one of the initial conditions

How can I vary an initial condition in the numerical solution of a system of ODEs and then make a 3D plot of the solution space with that condition as one of the variables. ...
15
votes
1answer
1k views

2D Heat equation: inconsistent boundary and initial conditions

I'm attempting to use NDSolve on a 2D boundary value problem with initial conditions. Upon running my code, I get the following message: "NDSolve::ibcinc: Warning: Boundary and initial conditions are ...
6
votes
2answers
367 views

Symmetry-finding packages

Where can I find the most up-to-date or whatever you consider to be the most useful symmetry-finding package for differential equations? I do not intend to restrict to, but would like to include ...
2
votes
2answers
827 views

Returning a function from a Module [duplicate]

I'm having problems working with the output from DSolve whilst in a module. To handle the result outside a module typically I would do something like ...
0
votes
1answer
209 views

Evaluating derivatives for use in solve

I need to evaluate the derivative of a function. My function looks like approx[vector_, x_] := Sum[vector[[n]]*Basis[n - 1, x], {n, 1, Length[vector]}] and I'm ...
2
votes
1answer
447 views

Intermediate variables in NDSolve

I'm interested in using NDSolve as an integrator for a system of differential equations that looks like the following: ...
2
votes
3answers
1k views

How to calculate partial derivative of an unknown function

How can I force Mathematica to calculate symbolically the partial derivative of a function u[x,y] with respect to a variable ...
5
votes
1answer
485 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 ...
6
votes
2answers
1k views

Is it possible to do vector calculus in Mathematica?

I am trying to rearrange and manipulate some vector differential equations in Mathematica. As far as I understand you have to tell Mathematica that a variable is a vector by specifying the components ...
3
votes
2answers
257 views

How can I get WhenEvent to recognize criterion I specify?

Using NDSolve I want to solve a differential equation till a quantity which is a function of the dependent variables reaches a certain value. My functions and criteria are complicated, but I am able ...
0
votes
1answer
120 views

Differential Equation help

I have a differential equation that looks like this: ...
1
vote
2answers
207 views

Discard ODE singular solutions with Mathematica?

The solution for a homogeneous second order linear ODE is generally a constant times one function plus another constant times a different function. Sometimes one of the solution functions is ...
0
votes
1answer
505 views

Setting boundary values of a second order differential equation

Not sure what is wrong with the boundary conditions for this problem: ...
0
votes
1answer
199 views

Subtracting results of NDSolve

I have 2 variables as a results from the NDSolve[] which are ua and uw. This is how I do it, ...
16
votes
4answers
853 views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
12
votes
4answers
916 views

How do I solve a PDE with a strange boundary condition?

How do I solve the PDE with boundary value like this $$u(t,x,y)=0, \textrm{when } F(x,y)=0$$ using DSolve? As a specific example, I want to solve heat equation $$\frac{\partial u}{\partial ...
2
votes
1answer
270 views

Using NDSolve solution as initial condition for another NDSolve

I have solved a PDE numerically using NDSolve, and I now need to be able to use that solution as an initial condition for another ...
0
votes
1answer
585 views

How to understand and use DSolve solution

This equation is simple to DSolve in Mathematica, but I don't know how to use and understand solution. ...
4
votes
2answers
2k 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. ...
1
vote
1answer
194 views

How to transform equation

Is there any possible way to write this equation of 4th order as a system of two diff equations of second order with two new variables and to do that automatically? statespace command is transforming ...
4
votes
1answer
543 views
5
votes
0answers
366 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 ...
1
vote
1answer
189 views

Finding parameters for first positive root of solution to differential equation to be equal to a desired value

I have a differential equation with parameters. The objective is to vary the parameters such that the first positive root of the solution is equal to a desired value ...
0
votes
1answer
435 views

DSolve output - understanding how to extract result

I'm a little confused with how to use the output from DSolve. The following works ...
0
votes
1answer
687 views

Decoupling system of differential equations

Here I have one task and it is preparation for small exam. I solved it by hand for first case 1), but I need to check it in $Mathematica$ and to try to implement it for both cases 1) and 2) ...
10
votes
1answer
635 views

NDSolve Differential Equation Error

I am trying to solve the following differential equation- ...
0
votes
1answer
407 views

Boundary Value Problem

I have to solve this boundary value problem: $$\frac{\mathrm{d}e_{3x}}{\mathrm{d}l}=(M_0+F_{0z}x-F_{0x}z)e_{3z}$$ $$\frac{\mathrm{d}e_{3z}}{\mathrm{d}l}=-(M_0+F_{0z}x-F_{0x}z)e_{3x}$$ ...
1
vote
1answer
265 views

Solving the wave PDE using the Fourier method

I am trying to solve the wave PDE using the Fourier method and I need to animate the plots of the partial sum of order 45 -- U45(x,t) with initial conditions U45(x,t0), {t0, 0, 12, .2}. I am ...
4
votes
1answer
2k views

How can I solve this PDE with initial conditions?

I wish to solve the following second order partial differential equation $$u_{tt}=c^2 u_{xx}$$ with the initial conditions $$u(x,0)=e^x,\quad u_t(x,0)=\sin x$$ In Mathematica, I evaluated the ...
2
votes
0answers
622 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 ...
1
vote
1answer
447 views

Optimizing the fitting of Ordinary Differential Equation(NDsolve) involving interpolation functions

I am a newbie to this forum. I am trying to use NDsolve to solve some ODEs involving the interpolation function. Then, I will compare the fitted curve and data to determine the ODE coefficients. ...
0
votes
0answers
96 views

A good choice to find solutions of ODE

In order to rephrase the question. I would ask you to take a look at the following problem: I have this system of ODE: $$ \begin{cases} \dot{x}(t)= x(t)[r_1(t) -b_1(t)x(t- \tau(t)) - c_1(t)y^m(t)] ...
-1
votes
1answer
169 views

Some Problem with WhenEvent!

Anyone knows what's the problem with the following code and how can I fix it? I am not sure that I wrote the WhenEvent section correctly. By the way, I want to solve the equations and then plot y vs. ...
4
votes
3answers
2k 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
0answers
112 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
1answer
871 views

How to correctly use DSolve when the force is an impulse (dirac delta) and initial conditions are not zero

DSolve (and NDSolve) return different and unexpected solution to differential equation when the input is an impulse. This is ...
1
vote
1answer
332 views

NDSolve for PDE with discontinuous initial/terminal condition

I have an issue with NDSolve for the case of a PDE with discontinuous initial/terminal condition. Consider the PDE solution ...