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

learn more… | top users | synonyms (3)

0
votes
1answer
105 views

Solving this equation with NDSolve

I'm trying to solve a differential equation numerically. I've written this code but it is leading to some errors "initial history needs to be specified for all variables for delay-differential ...
5
votes
0answers
78 views

Error with DSolve

I am trying to solve the following partial differential equation for the function $f(x,y,z)$ $\frac{(\alpha -\beta y)}{1-y^2}\left(\frac{\partial f}{\partial x} + \frac{(\alpha y-\beta ) }{\sqrt{1-...
0
votes
0answers
39 views

Why does NDSolve and ParametricNDSolveValue show different memory manage in same loop?

This is a follow-up question about How to delete InterpolationFunction created by NDSolve/ParametricNDSolve?. In the previous question, J. M.♦ and Albert Retey showed $HistoryLength = 0 and Clear[] ...
0
votes
2answers
46 views

Plot Piecewise does not work with NDSolve, works with ordinary function [closed]

How to join output from NDSolve with another function in a plot, using Piecewise or something else? I could join a simple function with another in a plot, but could not do it for the output. MWE: <...
1
vote
0answers
51 views

Eliminate a variable from a differential equation and an algebra equation then collect the remaining variables

Recently, I am attempting to eliminate a variable from a differential equation (DE) and an algebra equation (AE), then collect the remaining variables as a new (grand) parameter. Actually, I have ...
0
votes
1answer
122 views

Plotting two variables indirectly dependent on each other

I have the following system of linear ODEs for "i" number of species "c" migrating in "j" number of habitats: ...
1
vote
1answer
133 views

Time-dependent pde with periodic boundary conditions - NDSolve gives incorrect results

I'm trying to solve very simple differential equation with perdiodic boundary conditions and non-constant initial condition, however the results I'm getting don't seem to be correct. Here's my code: <...
1
vote
1answer
92 views

Plotting data from a Table in Mathematica

I have been able to solve some differential equations using Tables. The code works fine without errors. However, I am unable to plot the results. Any help would be appreciated. ...
2
votes
1answer
136 views

NDSolve::depdole error

I'm trying to solve a pair of differential equations with NDSolve. They contain a discontinuous function bounce. I've trimmed ...
3
votes
1answer
186 views

How to work with ParametricNDSolve?

Update 3: I got it. A small dumb mistake... It has to be Evaluate[xP[y]'[0] /. s10] like this. Oh well... Update 2: So if do this ...
0
votes
0answers
139 views

Three Body Problem Equilateral Triangle

I'm currently working on showing that the equilateral triangle arrangement of the three-body problem has an analytic solution. So far I've written the equations of motion of each body into Mathematica ...
1
vote
1answer
105 views

Boundary conditions shooting method

I am trying to solve the differential equation $\frac{d^{2}y}{dr^2}+(\frac{1}{r}+1)y=0$ with the boundary conditions $y(r) \rightarrow r \frac{dy}{dr}(0)$ as $r \rightarrow 0$ and $y(r) \rightarrow ...
3
votes
1answer
100 views

Kernel crash when evaluating NDSolveValue

I had a code that was working fine and I tried to add an extra few lines to find the solution of the same equation with different conditions. The original NDSolveValue solutions work fine but when it ...
-1
votes
1answer
172 views

Solving diffusion-like PDE for f(r,t)

I am trying to solve a partial differential equation like the following: where Sigma is mass density as a function of radial distance r and time t. I am expecting a diffusive behavior, and the ...
4
votes
0answers
66 views

How to put 2 or 3 NeumannValue conditions?

I want to solve numerically the heat exchange of a fin in transient state and two-dimentional, here is my attempt but instead of put DirichletCondition on ...
0
votes
0answers
43 views
1
vote
2answers
117 views

Back from transfer function (s-domain) to differential equation (in t-domain)

I've got the following transfer function (in the s-domain): $$\text{H}(s)=\frac{\text{C}s}{\text{RC}s+1}$$ Is there a function in Mathematica 10 that I can go back to the differential equation (in ...
4
votes
0answers
69 views

Avoid Evaluation of Function at NDSolve

I have a huge "black-box" f function, which I want to integrate. Let's define it: f[x_,y_,a_]:=a*Exp[-(a*10000)(x^3+y^3)] as ...
2
votes
2answers
110 views

Solving nonlinear 3rd order ODE over range from zero to infinity

Here are the code that I had tried but there is an error ...
2
votes
0answers
151 views

Bifurcation Diagram of Chua Circuit [closed]

I am currently working on a Bifurcation Diagram for Chua's Circuit but I am having trouble coming up with code for a bifurcation of a system of equations. The following equations are given in the ...
1
vote
1answer
253 views

Partial differential equation, Finite difference Method

For my research project I am trying to solve following partial differential equation in Mathematica (V[r]*ψ[u, v])/4 + Derivative[1, 1][ψ][u, v] == 0 with ...
-3
votes
1answer
91 views

Solving a first order PDE system [closed]

How can I solve using Mathematica the simple 1st order PDE system: $\frac{\partial P}{\partial x}=f(x,y,z)$ $\frac{\partial P}{\partial y}=g(x,y,z)$ $\frac{\partial P}{\partial z}=h(x,y,z)$ I want ...
5
votes
1answer
77 views

WorkingPrecision and NDSolve Method Plugin Framework

I'm studying some new numerical integration algorithms using NDSolve Method Framework to specify them. When I try to set ...
2
votes
0answers
78 views

Eliminating instabilities in a transient finite element solution at a discontinuity near t = 0

I have found a transient solution to the 1D heat equation where the initial condition is discontinuous. The results are accurate except for when time is small. The initial condition looks like this: ...
1
vote
1answer
58 views

How to test if DSolve can solve equation

I have a rather generic system of n first order ODE to solve, of the type $v_i'[t] + \frac{A}{t}v_i[t] = \sum_jI_{ij}[v_i[t],v_j[t]]$,   $I_{ij}=-I_{ji}$. Depending on the form of interaction ...
0
votes
0answers
73 views

Get around and solve stiff systems using NDSolve, particularly addressing “step size is effectively zero; singularity or stiff system suspected”

I have been trying to solve a non-linear 2nd order ODE varying in r & t with 2 boundary conditions (for ...
3
votes
1answer
204 views

Mysterious Difference in Equation Formulation for NDSolveValue and NDEigensystem

I have taken a standard equation from Mathematica help from here for a stress operator. I have also formulated the equivalent equations from engineering texts. When I compare the two equations Using ...
1
vote
0answers
84 views

How to understand the symbolic integral in a result returned by DSolve?

I am trying to solve an ODE like $$\frac{dF}{dx}=\frac{a}{\ln^3 x+[c+d(ax+b)][2\ln x+c+d(ax+b)]\ln x},$$ where $a,b,c,d$ are constants. I guess it could contain a special function, say, the ...
3
votes
0answers
144 views

Complex boundary conditions and NDEigensystem

I am having difficulties implementing a Neumann value when numerically solving the Navier equation using NDEigensystem. The Navier equation is given by $\nabla^2 \vec u + (p^2 - 1) \nabla(\nabla\...
1
vote
2answers
64 views

Solution to PDE with “MethodOfLines” is not returning any values

I have been working on this code for quite a while now trying different types of solutions and I cannot get any actual values out of the NDSolveValue function. I have included my code so you can see ...
2
votes
0answers
61 views

WhenEvent behavior changed from v9 to v10 - how to fix the code?

A couple of years ago I asked a question about solving n-body systems with NDSolve and detecting collisions with WhenEvent. I ...
2
votes
1answer
135 views

How to put the result of NDSolve in a function?

I have solved an ODE with NDSolve, and put the result in S: S = NDSolve[{y'[x]==(y[x]^4+y[x]+1)^(1/2),y[0]==0}, y, {x, 0, 100}] But i don't want to plot y[x] ...
2
votes
1answer
321 views

NDSolve with piecewise function gives error “Encountered non-numerical value for a derivative at x == 0.” [duplicate]

I am solving differential equation with piecewise function and i am getting error that NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 0.. >...
0
votes
1answer
33 views

Second order differential equation, with term from previous numerical solution

I have a second order differential equation, in terms of a term that was previously obtained from numerically solving another equation. Numerical solution of equation before 2nd order equation: <...
3
votes
2answers
136 views

Comparison between numerical solution of nonlinear ode and nonlinear ode of second order

Background Let's consider the following initial value problem for nonlinear system $$ \begin{cases} E' &=& 1 - n_e, \\ n_e' &=& -8\,n_e\,E, \end{cases} \tag{1} $$ with the following ...
2
votes
1answer
102 views

Finding terms of the perturbation solution

I've got a task to find first three terms of the perturbation series solution to: $$y' = 1 +(1+\epsilon)y^2,\quad y(0)=1, \quad t > 0,$$ for a small $\epsilon$. I am supposed to use Mathematica ...
3
votes
1answer
100 views

How to calculate an average error between numerical and analytical solution of the PDE?

I have second-order initial boundary value problem. Here's my code returning numerical solution (and plotting it). ...
1
vote
0answers
79 views

Easy way to get the boundary of a geometric object [closed]

I am trying to define von Neumann boundary conditions for a prism. To do so I need the boundary of the geometric object. I can't seem to find an easy way to do this. I have tried to hard code a ...
5
votes
2answers
192 views

How do I animate a bar chart?

Is there any easy way to have an animated bar chart (one where the heights of the bars change with time)? I currently have the following code: ...
8
votes
1answer
201 views

Finite element boundary breaking

I am trying to model a cantilever beam which can vibrate. On the left the beam is clamped. I am largely following user21 here and also the example in help. I start by doing a static beam which works ...
-1
votes
1answer
86 views

Error message when using DSolve

I am trying to solve the differential equation $2y^2 + 2 x y y' + x y^3 y' - 2 x^2 (y')^2 + x^2 y y'' = 0$ I tried ...
1
vote
0answers
87 views

Fitting data using ParametricNDSolveValue and NonlinearModelFit [closed]

I'm trying to evaluate the kinetics of the chemical reaction. For that I need to fit my experimental data to the kinetic equation. These are my steps in Mathematica. ...
0
votes
0answers
38 views

Numerical derivative of a function which solves a nonlinear system of ODEs

My dear friends, I want to study a nonlinear system of ODEs and to plot a function and its derivative which is defined from the functions of the system of ODE. The question is how to find the ...
3
votes
0answers
54 views

how to solve nonlinear partial differential equation of fractional order [closed]

How to solve this equation by using homotopy perturbation method with the help of the riemann liouville integral? Based on homotopy technique, this is as far as I can go. Somebody please help me (∂...
0
votes
1answer
138 views

NDSolve breaking down

I'm trying to model a situation involving charged sphere in a dynamic electric potential, and find out how the rotational motion of the sphere affects the translational dynamics in two dimensions. ...
5
votes
2answers
127 views

NDSolve: Using time delays in a WhenEvent

I was wondering whether there is a way to use WhenEvent in a system of delay differential equations, for example: ...
1
vote
1answer
173 views

Finite Element Mass and Stiffness Matrices

I am attempting to use the finite element method to solve a vibration problem. I am following user21's answer from here which is very helpful. My problem is that I am confused by the use of the mass ...
1
vote
1answer
71 views

Solving a differential equation with a specified “input vector”

I have the following differential equation: ...
-3
votes
1answer
253 views

system of differential equations in Mathematica

How can I formulate the addressed system of differential equations in Mathematica for to find a general solution for $f[x_1, x_2, x_3, y_1, y_2, y_3]$. http://math.stackexchange.com/questions/...