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

learn more… | top users | synonyms (3)

0
votes
0answers
56 views

Saving the result of a NDSolve

I have solved this diff equation (with no problems): ...
2
votes
3answers
113 views

How to integrate numerically the product of result of NDsolve? [closed]

I am going to integrate the product of the results of NDsolve, in fact If x and y are the results as interpolating function, How I can integrate x*y numerically? <...
0
votes
1answer
37 views

NonlinearModelFit error: the function value is not a list of real numbers with dimensions {101} at {a,k,m0} = \ {1.,1.,1.} [closed]

So I'm trying to find a sigmoidal fit for my numerical solutions of these two ODEs but I keep getting an error and I don't know how to get around it. Here's my code: ...
0
votes
1answer
205 views

How to pass arguments in NIntegrate and NDSolve

I am solving PDEs with NDSolve and NIntegrate, but I do not know how to pass arguments correctly. My orignial code is very ...
0
votes
2answers
117 views

Solving a set of nonlinear equations

I am trying to setup and solve a set of nonlinear equations. I keep getting an error. Here is my problem: ...
-1
votes
1answer
128 views
0
votes
1answer
65 views

Error message when running NDSolveValue

I am trying to solve a set of differential equations but keep getting an error. See message below "NDSolveValue::ndnum: Encountered non-numerical value for a derivative at t=0" The system that I ...
2
votes
3answers
130 views

NDSolve and differentiation of Abs

I have found several questions about the derivative of Abs and how it is not defined in the complex plane. What I have not found yet is a precise and simple ...
6
votes
1answer
122 views

How to numerically solve a 1D time-independent Schrödinger equation for two interacting particles

Solving the 1D single-electron time-independent Schrödinger equation has been demonstrated using NDEigensystem here. There, the single-electron Schrödinger equation ...
0
votes
0answers
67 views

Nonlinear coupled equation (heat equation with source term)

I modeled simple chemical reaction-diffusion equation in spherical region $0\le r\le L$ $${\partial T\over\partial t}={{1\over r^2}{\partial\over \partial r}(r^2{\partial T\over \partial r})+qACexp(-...
1
vote
2answers
124 views

Discontinuous boundary condition in NDSolve

Assume we have any PDE to be solved on the rectangular domain $0<X<4$ and $0<y<2$ How do we tell Mathematica to impose the following boundary conditions? $\cases{ U[0,y,t]=0,& if $0&...
2
votes
2answers
262 views

Ion motion in uniform axial magnetic field and radial electric field [closed]

I'm trying to model an ion's 3D motion in a constant/uniform axial magnetic field and a radial electric field (similar to a cylindrical magnetron, but two positive parallel center electrodes offset by ...
0
votes
0answers
59 views

Solving a complicated integro-differential equation

I'm trying to solve the integro-differential equation: $-(1+z) H(z) \frac{d f_{i}}{dz} = J_{i}(E',z) - f_{i} \sum_{j} n_{\nu_{j}} \sigma_{ij}(E',z) + \int_{E'}^{\infty}dE~\sum_{j,k}f_{k} n_{\nu_{j}} ...
0
votes
0answers
18 views

Simple heat equation with exponential reaction term [duplicate]

This is the heat equation that i want to solve $${\partial T\over\partial t}={{1\over r^2}{\partial\over \partial r}(r^2{\partial T\over \partial r})+qAC_0exp(-E_a/RT) } \ \ \ 0<t<10, \ \ \ 0<...
2
votes
2answers
127 views

How to plot an Eddington-Finkelstein diagram

I need to plot the same thing as what is shown on the third picture of the site below (sorry, I'm unable to poste that picture here) : http://ion.uwinnipeg.ca/~vincent/4500.6-001/Cosmology/...
1
vote
1answer
45 views

PolarPlot with InterpolatingFunction not working?

So I have solved a PDE with NDSolve which returns h -> InterpolatingFunction. I can happily plot the results with ...
3
votes
1answer
173 views

How can I combine NDSolve[] with NSolve[]

Consider the two below ODEs with following dependent B.C. In the boundary conditions $k$ is an unknown. $$y_1''(x)=x$$ $$y_2''(y)=0$$ $$y_1(1)=y_2(1)$$ $$y_1(-k)=y_2(-k)$$ $$\frac{\text{dy}_1(1)}{\...
1
vote
0answers
203 views

Wave equation PDE with changing boundary condition [closed]

This is my first post here, normally with mathematica I will solve out the PDE using eigen function expansion or separation of variables and then model the solution in mathematica. However this time I ...
1
vote
2answers
86 views

Stop Integration in NDSolve

The following code executes properly for some choices of initial points and parameter c, but fails for other choices. Could the failure be due to computation outside of the defined t, x, and y ranges? ...
1
vote
0answers
271 views

Problem with NDSolve in Mathematica 9 / 10

I'm having trouble by solving the following differential equation in Mathematica 9 and 10, where the code works fine in version 7: ...
6
votes
2answers
869 views

PDE with Stefan Conditions, a.k.a variable boundary

I want to solve the one-dimensional one-phase Stefan problem, but I don't know how to make Mathematica understand the conditions. If you are not familiar with what I'm asking please refer to this ...
8
votes
2answers
130 views

Bug in NDSolve/WhenEvent?

Bug introduced in v10. I'm fairly sure the following is a bug, and I would normally just report it to WRI. However, this is related to my answer to When using NDsolve, how to determine the ...
-2
votes
1answer
68 views

Neumann and Dirichlet eigenvalue problem - Eigenfunctions on the square [closed]

I don't know if I am in a good place to ask my question, but I'd like someone to create a visual support for a problem of mathematics. I was wondering what is the fundamental different between a ...
3
votes
3answers
222 views

When using NDsolve, how to determine the positions of steady states?

I am currently trying to numerically solve a set of ordinary differential equations of chemical kinetics. However, I want to implement perturbations only when system reach steady states. For example ...
5
votes
3answers
1k views

How to deal with zero in NDSolve in mathematica?

I would like to solve the following ODEs $$\begin{cases} x'(t)&=y\\ y'(t)&=-y(t)/t-e^{x(t)},\\ x(0)&=1,\\y(0)&=0, \end{cases}$$ (EDIT : The second equation used to be $y'(t) = -x(t)/...
5
votes
3answers
153 views

NDSolve divide-by-zero trouble

So I have a set of differential equations (which I know are analytically integrable) but I want to integrate them numerically to get the form of the solution (the solution is not explicit and hence I ...
4
votes
2answers
909 views

Numerical solution of Bessel-like equation using NDSolve

I need to calculate solution of Bessel-like equation having general form: $\frac{d^2F}{dr^2}+\frac{1}{r}\frac{dF}{dr}+Q(r)F(r)=0$. Problems come from the points near $r=0$ leading to numeric errors. ...
1
vote
2answers
349 views

NDSolve giving the wrong solution?

I'm considering the non-linear second order ODE DE $=0$, with DE given by ...
0
votes
1answer
47 views

Speeding up WhenEvent + NDSolve (Performance tuning and handling instabilities)

I am solving a non-linear partial differential equation using NDSolve. The equation models a liquid film on an isothermal solid substrate. As a result of various fluid physics mechanisms such as ...
0
votes
0answers
36 views

Evaluating solution from NDSolve at a specific point

sol = NDSolve[{eq, iv}, {f[x, t]}, {x, 0, 1}, {t, 0, 10}]; sol[0,1] I want to evaluate the solution from NDSolve at any given point, but when I do the above, ...
0
votes
1answer
45 views

system of differential equations 3 DSolve [closed]

dS/dt = a - dS - λ S I + β R dI/dt = λ S I - (d + m)I dR/dt = m I- (d + β)R Solve the above equation and plot the curve.
3
votes
0answers
60 views

Two questions about “wraparound” with “Event” method

I am learning EventLocator method from the document center. As for the following code (copy from this document) solving the sine-Gordon equation, it uses the ...
2
votes
1answer
381 views

ParametricNDSolve KKT Constraint Directly

I am trying to directly solve for an optimal control using Pontryagin Maximum, where H is the Hamiltonian, in the presence of a KKT constraint. The constraint is ignored. I am wondering if a direct ...
1
vote
0answers
51 views

Any possible to save a 'partial' result of NDSolve when it was aborted due to insufficient memory?

I have run a NDSolve code for an extremely long time. Unfortunately, it was aborted because there was insufficient memory available to complete the computation. At ...
0
votes
1answer
119 views

Plotting Limit Cycle

I have Lotka Volterra Equations where the prey equation is modified. The Equations are x'[t]=a*x[t]*(1-x[t]/k)-b*x[t]*y[t] y'[t]=-c*y[t]+d*x[t]*y[t] To plot the ...
1
vote
0answers
110 views

Fitting Three-Dimensional Data with Parameters

I have been trying to fit a model of rate equations to data of three dimensions. The rate equations in my model are as follows. ...
0
votes
0answers
58 views

Numerical fitting trajectory to model that has NDSolve

I have a model which describes the motion of an object on a plane. ...
0
votes
0answers
53 views

Double Integral with NDSolve!

I have fivefold multiple integral and I wanted a speed calculations.I came across on this Question and had already begun the problems. Here is a toy example with simple double integral: ...
0
votes
1answer
56 views
3
votes
1answer
57 views

Why does the Part::partw error appear when using DSolve?

I solved the following ordinary differential equation for $F(x)$ using DSolve in Mathematica $$ \begin{align} \begin{split} & A x^2 (x^2 + 1) F'''(x) - \left(3 A (b - 2) x^3 + a x^2 +A (b - 2)x +...
0
votes
1answer
61 views

Diffusional equation [closed]

I am still new to Mathematica. I'm trying to solve a diffusional equation ...
0
votes
1answer
58 views

Can I solve system of differential equation in a matrix form?

I'd like to solve simple system of differential equations: x'[t] == 6x[t] - 6y[t], y'[t] == x[t]-2y[t]; but I want to avoid formulas like DSolve[{x'[t] == 6x[t] - 4y[t], y'[t] == x[t]-2y[t]}, {x,y},...
0
votes
0answers
27 views

How many boundary conditions are required for two coupled Non-linear ODE in two variables?

I'm using NDSolve to solve the following two coupled Nonlinear ODEs in two variables: Equation1 = Equation2 = It can be seen that the level of nonlinearity is very high. I have solved the ...
0
votes
2answers
46 views

Produce several file outputs within one calculation

I have a differential equation which I solve with NDSolve. With the obtained solution I calculate some quantity. Then a constant in the ODE will be raised (until a ...
1
vote
0answers
38 views

Looking under the hood of DSolve [closed]

Is it possible to print out information about the algorithms DSolve uses to solve a differential equation? I'm looking for something similiar to this Maple procedure. It lets you specify how much ...
2
votes
1answer
104 views

Using loops to draw multiple polygons and discretizing them

I am trying to plot the first eigenvalue of the Laplacian operator with zero Dirichlet condition on following figure against decreasing values of $\varepsilon$. I used ...
4
votes
1answer
100 views

Issues with modeling pulses in a very simple system of DAEs

Bug introduced in 10.4.1 or earlier Bug has been confirmed by WRI [Case:3594387]: It does appear that the NDSolve function is not behaving properly in this case and an incident report has been ...
1
vote
1answer
53 views

Using NIntegrate inside NDSolve

I need to use NIntegrate inside NDSolve, for example: ...