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

learn more… | top users | synonyms

17
votes
1answer
1k views

Optimizing a Numerical Laplace Equation Solver

Laplace's Equation is an equation on a scalar in which, given the value of the scalar on the boundaries (the boundary conditions), one can determine the value of the scalar at any point in the region ...
2
votes
1answer
220 views

Plot differential equation system in a complex way

Based on this differential equation system: $$\begin{align*} \dot{x}&=f(x,y)\\ \dot{y}&=g(x,y) \end{align*}$$ where $$\begin{align*} f(x, y)&=x^2+y^2-25\\ g(x, y)&=x^2-y^2-7 ...
1
vote
1answer
93 views

Using Manipulate Feature for Two ODE's

So I have not been able to find any examples of the Manipulate feature for two ODE's. I would like to plot a graph of x[t] vs. y[t] and manipulate the initial conditions, v and theta. Thank you very ...
3
votes
1answer
98 views

How could I find the singular solutions of an ODE?

Starting with the equation $$y^{\prime\prime}x^2={y^\prime}^2$$ I could only get the general solution using DSolve: ...
5
votes
2answers
3k views

Solving a system of ODEs with the Runge-Kutta method

I´m trying to solve a system of ODEs using a fourth-order Runge-Kutta method. I have to recreate certain results to obtain my degree. But I'm a beginner at Mathematica programming and with the ...
2
votes
2answers
470 views

How to remove a singularity with WhenEvent

Bellow I have a differential equation which hits a singularity at low values of t. What I want to do is somehow utilize the WhenEvent command in order to replace ...
0
votes
2answers
240 views

characteristic polynomial based on differential equation

I have this differential equation: $$\ddot{x}-\frac{1}{6} \dot{x} - \frac{1}{6}x = e^t$$ When I DSolve it looks like this: ...
2
votes
1answer
364 views

NDSolve complains about missing derivatives of dependent variables in Mathematica 9

In Mathematica 8 NDSolve[{x[t] == 1, x[0] == 1}, x[t], {t, 0, 10}] solves fine and returns ...
1
vote
2answers
516 views

Solve Differential equation system

I've tried to solve this differential equation system, buy without any luck. This is my code: ...
1
vote
2answers
537 views

How can I use FindRoot on an expression from NDSolve?

I have a second order ODE that I can only solve numerically using NDSolve, but I then need to use the solution in FindRoot and am running into errors. A simplified but analogous problem is the ...
4
votes
1answer
317 views

Create Euler equation

I've tried to make some research, but without any luck. How do I setup the Euler equation for this in Mathematica?: $ \text{Min} \int_0^1\left(2x^2+ \left(4t-5 e^{r \, t} \right) x \, \dot{x} + ...
4
votes
2answers
506 views

WhenEvent in NDSolve

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

Tutorial for basic numerical methods for PDEs

I'm afraid this is probably not going to be a "good" question, but I'd like to use Mathematica to learn about basic numerical schemes for solving pdes. For example, I'd like to compute the solution of ...
2
votes
2answers
631 views

Putting NDSolve into ParametricPlot

I am having issues using Manipulate to plot the (numeric) solution to an ODE for different parameter values. I have a code that has several stages, which seem to ...
5
votes
0answers
86 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 ...
3
votes
2answers
602 views

NDSolve: Normalizing at every step

Suppose I have an transport equation with an initial conditions: ...
2
votes
2answers
352 views

BC for transport equation using NDSolve

First I can solve a transport equation with a source (Is it still called transport equation?) using DSolve. The form of the source serves only as an example. It can ...
4
votes
0answers
447 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,\\ ...
2
votes
0answers
310 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 ...
4
votes
1answer
1k views

Is it possible to impose “Assumptions” in DSolve or equivalent? (differential equation solving)

When DSolve tries to solve differential equations, it is sometimes not smart enough to generate conditions according to different possible value of parameters. ...
1
vote
1answer
563 views

Finding numerical/analytic solution to a derivative

Consider the following system of equations, with 11 dependent variables: ...
0
votes
1answer
1k views

DSolve fails to solve second order PDE

I have a very simple example of a second order PDE: eqn = D[u[x, y], x, y] + u[x, y] == 0; sol = DSolve[eqn, u, {x, y}] and Mathematica cannot solve it! What is ...
3
votes
1answer
1k views

NDSolve does not respond

For some sets of constants, NDSolve gives me true solutions, but when I try for example, T = 1/(2*2200), Mathematica does not respond. What can I do? The code below ...
0
votes
2answers
507 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
173 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
708 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
450 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
269 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
356 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
112 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
673 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
658 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
268 views

Troubleshooting an NDSolve::ndfdmc error message

Τhe following code ...
1
vote
2answers
538 views
1
vote
1answer
161 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
327 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
376 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
859 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
216 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
462 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
512 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
2k 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
271 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
210 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
522 views

Setting boundary values of a second order differential equation

Not sure what is wrong with the boundary conditions for this problem: ...