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

learn more… | top users | synonyms

2
votes
2answers
445 views

How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?

Here I use a one-dimensional heat conduction equation as the example. I found that when the thermal diffusion coefficient is small enough, Mathematica will give a result against the second law of ...
1
vote
1answer
189 views

Particular solutions of a Differential Equation not evaluated in a given case

Below first case which gives particular solutions of an OED correctly: ...
4
votes
2answers
2k views

How to handle NDSolve::ndsz problem (singularity problem)

I have 2 second order differential equations (non-linear). The physics behind them is correct. I verified the equations many times. It is a solid pendulum with a mass-spring at the end of it. Now, ...
2
votes
2answers
679 views

Manipulate a Differential Equation result

I want to Manipulate the result of Differential Equation like : ...
8
votes
2answers
279 views

Differentiating an unknown solution to a PDE

Sorry if this question is too basic -- I'm not very familiar with Mathematica. I am interested in a way to systematically address the following sort of problem: Suppose that $u=u(x,y)$ is a function ...
2
votes
2answers
711 views

Interpreting the interpolating function and saving data to plot with external program

So far I have been solving non-linear pdes with NDSolve and then plotting the result with the in-built Plot3D and ...
7
votes
0answers
2k views

Integro-differential equation

I have to numerically solve a nonlinear partial integro-differential equation using Mathematica. This is my equation, $$\frac{\partial y(x,t)}{\partial t}=\int_{-\infty}^\infty K_0(|x-u|) ...
0
votes
0answers
49 views

integro differential equation [duplicate]

Possible Duplicate: Integro-differential equation I have to solve an Integro-differential equation with Mathematica or Matlab, in the following form: ...
6
votes
4answers
2k views

Change variables in differential expressions

I have a fairly complicated differential expression in terms of a variable r and two unknown functions of r, B[r] and n[r]. I want to do a Taylor expansion of this around r=infinity. I want to do this ...
8
votes
1answer
620 views

I failed to solve a set of one-dimension fluid mechanics PDEs with NDSolve

@DNA The fluid here has been assumed as single component perfect gas i.e. it obeys the equation P=ρRT, the thermal conductivity is assumed as a constant, so the equation is: ...
4
votes
1answer
367 views

Multiple simultaneous events in EventLocator method for NDSolve

I'm using NDSolve to integrate a system of ODEs, and EventLocator to stop the integration when it leaves a certain region in phase space. This works perfectly as it should. However, I've also added ...
5
votes
2answers
710 views
2
votes
2answers
1k views

Animation of Differential Equations from NDSolve with ParametricPlot3D and Evaluate

I have a system of differential equations (referred to as "s") and use NDSolve to obtain the solution. I substitute the interpolated functions for the original ...
6
votes
1answer
601 views

vectorial ODE in mathematica with matrix exponentials

I want to solve the following equation in mathematica : DSolve[{X'[t] == A.X[t], X[0] == ( {{0},{0}} )}, X[t], t] It is a system of 2 ODEs coupled by the matrix A, ...
4
votes
1answer
511 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. ...
3
votes
1answer
255 views

Could the PrecisionGoal for NDSolve be a negative number?

The help of Mathematica doesn't say so much about the PrecisionGoal for NDSolve, and I never considered much about it even after ...
0
votes
1answer
647 views

Fourier series of interpolating function result of NDSolve

I am having a tough time formulating the right question but here goes. I know that solving the pde as in here gives me an interpolating function. I understand that the interpolating function object ...
3
votes
2answers
373 views

How to set the initial condition? (to make IC and BC consistent)

I want to find the initial condition which fits mixed boundary condition of Phi[r, Theta, t]. The original initial condition in text is Phi[r, Theta, 0] == 1 . ...
1
vote
1answer
411 views

I ran into an error when I was trying to solve a PDE with a piecewise initial condition by NDSolve

This is a very simple one-dimensional heat-conduct equation, the only special part of it is the piecewise initial condition: ...
12
votes
4answers
7k views

How can I plot the direction field for a differential equation?

I'd like to plot the graph of the direction field for a differential equation, to get a feel for it. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can ...
27
votes
2answers
2k views

Efficient Langevin Equation Solver

This question is not about good algorithms for solving stochastic differential equations. It is about how to implement simple codes in Mathematica efficiently exploiting Mathematica's programming ...
2
votes
1answer
957 views

Function output from DSolve

I want to get a function as output form DSolve. For Example : sol = DSolve[{Q''[t] + 40 Q'[t] + 625 Q[t] == 100*Cos[10*t], Q[0] == 0, Q'[0] == 0}, Q[t], t] I ...
5
votes
3answers
1k views

How to use results of NDsolve[] for further solving of ODEs?

I have a system of ODEs with 10 eqns. I can solve the first 5 independently. How can I use those results to solve for the remaining 5? An easy example would be $\dot{x}=f(x), \quad \dot{y}=g(x,y)$ ...
0
votes
1answer
239 views

Problem with Eventlocator Method for NDSolve

I want to solve the ode and plot the solution v[x] for different values of parameter a where ...
2
votes
1answer
541 views

Solution of numerical vector equation

Suppose I have a vector equation: Y'[t]==rhs[Y[t]] and Y[0]==ConstantArray[0,n] where "rhs[Y[t]]" is a black box function ...
7
votes
1answer
695 views

Optimizing an energy functional in mathematica using variational calculus

I have an energy functional which I want to optimize using calculus of variation. It would be nice if someone could please post a working example using mathematica. The procedure is as follows, ...
1
vote
1answer
174 views

Backward compatibility issues while DumpSaving Interpolation polynomials

I have bkwrd compatibility issues when I save my NDSolve result (which is an interpolating polynomia) using DumpSave from Mathematica 8 on Windows 7 and then try ...
9
votes
1answer
651 views

How to tell mathematica not to resolve stiffness issues

Very often I solve partial differential equations that are nonlinear and could be up to 4th order. In these cases, it is usual for the solution determined by ...
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: ...
2
votes
1answer
329 views

Laplacian or Grad of an InterpolatingFunction

For obtaining a Schlieren image from an equation for density, I need to calculate the first derivative of density and make a contour plot. The below code snippet calculates the first derivative w.r.t ...
2
votes
2answers
491 views

How to solve a Differential Equation with DSolve with Function Coefficient?

Suppose I have v[x_] = (1.453 Sech[x + 1])^2 + I Sech[x + 1] Tanh[x + 1] And I have to solve the equation: ...
2
votes
2answers
793 views

optimization problem with NDSolve

I want to minimize the function fcc. When fcc is calculated for a specified point the answer is correct: ...
2
votes
1answer
571 views

Optimizing a function involving NDSolve results in error messages

I want to minimize a function f with NMinimize but an error occurs that says: ...
9
votes
1answer
317 views

How can I eliminate a function in a system of PDEs, Maple-style?

Maple can separate and eliminate a function in a system of PDE equations, with casesplit in the PDEtools package. How to do ...
3
votes
2answers
606 views

Eliminate doesn't work in Mathematica

Hello Mathematica users, I have problems trying to eliminate variable $Q(x,y)$ froma PDE, but Mathematica output is just True. The problem is that I already found ...
2
votes
1answer
406 views

Inconsistent initial and boundary conditions

I have a 4th order nonlinear PDE with the following BCs and IC: ...
4
votes
1answer
884 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. ...
0
votes
2answers
334 views

Plotting with NDSolve`StateData`

This question is a continuation of this. As answered by J.M., I am able to iterate a solution. However, I am unable to plot it. I am sure that this has to do with my inability to understand how the ...
0
votes
2answers
291 views

NDSolve and results of the previous computations

I want to solve following system of ODEs: $ \Bigg\{ \begin{array}{} \frac{\partial C}{\partial t}=\frac{2W_b}{Rsin(\theta)}(1-\frac{C}{\gamma})+\frac{\nu}{\pi R^2}\frac{\partial C}{\partial Z} ...
4
votes
2answers
716 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 ...
6
votes
2answers
399 views

Starting NDSolve from intermediate time step?

I always wondered if I could start NDSolve from an intermediate time step. What I mean is, in the code sample below, if I were to run my solution from tmin=0 to ...
10
votes
2answers
462 views

DSolve cannot solve for certain branches of the solution

Could somebody please tell me, why I am always getting an error message when trying to run the following code: ...
11
votes
2answers
990 views

How can I solve a difference-differential equation?

How do I ask Mathematica to try to solve a recursive relation that defines a sequence of functions? For example, suppose I know that $g_n(x) = g_{n-1}'(x)$ for $n > 0$ and that $g_0(x) = e^{2x}$. ...
3
votes
1answer
383 views

Solving an ODE numerically

I really appreciate it if anyone helps me with this: How can I solve this ODE and plot the answer for $x$ on $[0.6,5]$: $$ \begin{align*} -2xy'[x] = y''[x]+ 47.21 (-.0025 x^6 & + ...
6
votes
0answers
700 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 ...
1
vote
1answer
186 views

NIntegrate is resetting my variables and not giving me a result?

I am trying to check if mass conservation holds by integrating the area under a curve but to no avail. ...
6
votes
1answer
332 views

What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
8
votes
1answer
340 views

Setting the DifferenceOrder Option

I've been playing around with Method in NDSolve[...] and can't quite seem to figure out how to force ...
5
votes
1answer
1k views

NDSolve, Schrödinger equation, and decaying solution

I am trying to solve a Schrödinger equation for a particle hitting a step potential using NDSolve in Mathematica. Here is my code: ...
6
votes
2answers
671 views

How to set the NDSolve method to LSODA

I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...