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

learn more… | top users | synonyms (3)

3
votes
2answers
40 views

Reject diverging solution of NDSolve

I'm trying to numerically simulate a spring system with complex stiffness. In essence systems of the form $x''(t)+ (a+ ib) x(t)=0$ For this simple example an analytic solution is easy to find. The ...
1
vote
1answer
52 views

How to solve time dependent coupled differential equations using Floquet method?

I have coupled differential equations D[X[t], t] == M[t] X[t] + R[t] where ...
0
votes
2answers
69 views

Problem with NDSolve: derivative interpreted as square

I am using Mathematica 9, and trying to solve a very easy differential equation with NDSolve. The code I have is s=NDSolve[{y'[x]==y[x],y[0]==1},y,{x,0,1}] but I ...
0
votes
0answers
21 views

steady state of coupled partial differential equations

I need to solve coupled differential equations(occur regularly in Phase field theory), \begin{eqnarray} \tau \frac{\partial \varphi}{\partial t} &=& W^2\frac{\partial^2 \varphi}{\partial x^2} ...
2
votes
1answer
38 views

Error accumulation in NDSolve?

I'm trying to solve this system of ODEs numerically: $$\vec{Q} = \vec{P} \times \vec{Q}$$ where vectors $\vec{P}, \vec{Q}$ have 3 components: $$\vec{Q} = \left( Q_1, Q_2, Q_3 \right) $$ $$\vec{P} = ...
1
vote
0answers
40 views

Converting integral equations to differential equations [on hold]

I am trying to use Mathematica to convert integrals to differential equations, of any order. An example of an integral equation is given below, in Mathematica code. Could you please advise as to the ...
0
votes
0answers
38 views

How to use NDSolve to solve the system of differential equations? [on hold]

Reference: Mathematical model for HIV/AIDS with complacency in a population with declining prevalence from http://downloads.hindawi.com/journals/cmmm/2006/471467.pdf I found the differential ...
-2
votes
0answers
26 views

Root of a function defined by a differential equation [duplicate]

I need to find the zero of a function sigma defined by a differential equation of the following form $$u*\sigma'(u)+(1-\chi_0)*\sigma(u)+\sum_{k=1}^{D} \sigma(u-x_k)(\chi_{k-1}-\chi_{k})=0,$$ with the ...
5
votes
0answers
71 views

Compiling FoldList implementation for RK4

Original I'm looking to write an integrator for a function of two variables. Here is my implementation for the RK4 update rule using FoldList. ...
0
votes
0answers
57 views

NDSolve Syntax Error- 29 simultaneous differential equations [on hold]

Please note that I do not need a detailed solution specific to the equations, but rather a general way to fix the error. I am trying to solve 29 simultaneous differential equations in Mathematica ...
-1
votes
0answers
24 views

Plot How to plot dV/d(lnJ) [on hold]

I measured I-V characterization, so I've got their data. But sometime I want to plot dV/d(lnJ) curve with my data. Can someone help me? How to plot dV/d(lnJ), J is current density.
0
votes
1answer
70 views

Solving non-linear ODE analytically in mathematica [on hold]

I would like to solve the following differential equations $${dx\over dt}=\beta x-{{(C-x)^2}\over 4k} ,t\in[0, T]$$ where $\beta$,$C$ and $k$ are constant values. Also, the folowing terminal ...
2
votes
0answers
42 views

ParametricNDSolveValue has a problem with complex numbers

Edited: I have simplified the example compared to before and narrowed the problem down a bit. I would like to use ParametricNDSolveValue as function for data ...
0
votes
0answers
58 views

How do I solve a system of PDE with a Dirichlet boundary condition and piecewise condition Initial?

How do I solve the system of PDE with boundary value like this and initial conditions piecewise Please help me to find a solution in a Wolfram Mathematica program. I have several times ...
2
votes
3answers
130 views

Trouble with differential equation

I tried to solve this differential equation: $$\epsilon y''(x)+xy'(x)=-\epsilon \pi^2 \cos(\pi x)-\pi x\sin(\pi x)$$ with boundary conditions: $y(-1)=-2, \space y(1)=0$. If we take $\epsilon=0.1$, ...
-5
votes
1answer
96 views
2
votes
2answers
107 views

Steady State Numerical Solution of Heat Diffusion Equation in 2D

I'v been trying to solve for the steady state of the heat diffusion equation numerically but I cant seem to get it to work. My code is ...
3
votes
1answer
85 views

Use FEM Solver for System of Nonlinear PDEs with Nonlinear Coefficients - Reaction-Diffusion

I am trying to solve a complex transient reaction-diffusion problem numerically in 2D. Let's take a simple system to start, say $$ A+B\rightarrow C \\ C \rightarrow A+B $$ with reaction rate $k_1$ ...
0
votes
0answers
58 views

Retrieving forthcoming step size from NDSolve

I'm solving a system of ODEs with a random component, which changes at each calculation step and depends on the step size. So I'm trying to realize something like this: (1) size of the forthcoming ...
2
votes
3answers
124 views

Why does DSolve return two solutions for my ODE?

I wanted to solve the differential equation: $y’ = (1+2x)\sqrt{y}$ with $y(0) = 1$. It can be done by hand, and to check my answer I typed the following in Mathematica ...
1
vote
4answers
127 views

Why can't Mathematica DSolve my equation? [closed]

I am trying to solve $\begin{cases} v(t) = A \cdot e^{kt} \\ v(t) = s'(t) \\ s(0) = 0 \\ v(0) = A \\ v(6000) = 299792458 \\ s(6000) = 2.37 \cdot 10^{16} \end{cases}$ for $A$ and $k$. But neither of ...
2
votes
0answers
40 views

NDSolve returns asymmetric solution to a symmetric equation

I am trying to find the potential of a conducting cylindrical electrode by solving the Laplace's equation. Both, the boundary conditions and the equation are symmetric w.r.t. the change $r\to-r$. ...
2
votes
1answer
82 views

NDSolve-Problem (Calculating field lines)

I want to calculate the field lines of a quite nasty vectorfield. In general the method works fine - except, one of the components of the VF gets 0 - then NDSolve ...
0
votes
0answers
59 views

Boundary value problem time imaginary method [closed]

I want to solve the following equation using the time imaginary method. $\quad \quad -y''(n)+n^2\,y(n)-{\rm abs}(y(n))^2\, y(n)=M\,y(n)$ where $M$ is an eigenvalue and with boundary conditions ...
1
vote
1answer
157 views

Modeling a stellar atmosphere

I'm trying to model a stellar atmosphere using Mathematica. Basically I'm working in a physical and chemical model which combined should give me a profile of the chemical abundance in the atmosphere. ...
4
votes
1answer
59 views

WhenEvent used in a PDE to output independent variable

I want to use WhenEvent with a PDE after it has reached steady state. I'm posting a system of 2 equations (my real system has 6) and I'm solving the advection-diffusion-reaction 2nd order PDE. First ...
3
votes
1answer
91 views

Smoothing a unit step function

I want to smooth a unit step function for use in NDSolve so this function is a smooth function of time (t). How can I do the ...
3
votes
2answers
110 views

Using periodic boundary conditions in NDSolve

I need to solve a 2D linear elliptical equation in polar coordinates using NDSolve, but I can’t seem to get Mathematica to accept the required periodic boundary conditions. My actual differential ...
10
votes
2answers
195 views

How to use NDSolve with discontinuities at internal boundaries?

I don’t know how to impose discontinuous internal boundary conditions (BCs) in NDSolve, so I’ve set up an example problem to illustrate my issue. Consider the simple first-order ODE for $f(z)$ on the ...
11
votes
2answers
234 views

Solve differential equation using a integral form boundary condition

I have a second order differential equation and I want to solve it analytically (DSolve) and numerically (NDSolve) with ...
0
votes
2answers
72 views

How can I check that the general solution obeys the original differential equation?

For example: I solved the following differential equation: y''[x] == (λ x^(3/4) y[x])/Sqrt[1-x] that 0<x<1 with the ...
0
votes
1answer
66 views

How can I use NDSolve with a variable parameter?

I'm a new user and I can't understand how to solve this function for variable values of vr (for example vr from 0 to 5 in steps ...
0
votes
1answer
51 views

Solving differential equation (Analytical or Numerical)

I want to solve the following differential equation for $0 < x < 1$ ...
0
votes
1answer
58 views

NDSolve Problems with Cardiovascular Modeling [duplicate]

I am trying to use 27 simultaneous differential equations to model the cardiovascular system. I have the following code, however, the output isn't giving interpolating functions, but rather another ...
3
votes
3answers
126 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 ...
1
vote
1answer
92 views

Animating a 3D shape along path a (2D and 3D) parametric function curve [Update]

I have a 3D object under the action of gravity field.The trajectory of path is a parabola.I would like to animate , as in the example GIF. ...
0
votes
0answers
37 views

How to get this numerical solution of a integro-differential equation [migrated]

Previously, I ask an NDSolve questions(How to solve the differential equation with Duhamel's integral?), but now a more sophisticated one: ...
4
votes
0answers
67 views

Confirming conservation laws for complex valued functions

Consider the nonlinear Schrödinger equation (I would like to do this for a more complicated set of equations, but to gain understanding I'll consider this simplified case) $$A_t+iA_{xx}+i|A|^2A =0,$$ ...
0
votes
1answer
31 views

How can one make NDSolve spend less time at irrelevant transient oscillation?

In the solution there is a transient oscillation that is irrelevant. NDSolve spends a lot of time there. Is there a way to optimize it?
-2
votes
1answer
36 views

NIntegrate a function containing NDSolve

I am having an issue integrating a function for which I am getting values for when I evaluate it. ...
4
votes
1answer
124 views

DSolve misses a solution of a differential equation

[Note that in the cited duplicate, DSolve not finding solution I expected, the general solution returned by DSolve is missing a solution for quite different reasons ...
1
vote
1answer
90 views

How do I solve this ODE numerically in Mathematica?

I want to solve these equations numerically in Mathematica and plot them. \begin{equation} u'(t)=1.5\,u(t)\,v(t)-u(t) \space \space \space \text{and} \space \space u(0)=0.001 \end{equation} ...
1
vote
1answer
73 views

Solving differential equation but keeping showing running

I am trying to solve this differential equation, see the command below. But the cell keeps showing that it is running without giving any answer for a very long time. Eventually I had to abort it. Does ...
0
votes
0answers
57 views

How to solve two point boundary value problem numerically

I'm new to mathematica and I'm interested in solving the following optimal control problem: $$ \min_{\rho_1,\rho2}\int_0^Te^{-\beta t}(Nd(t)+\rho_2y_2(\rho_2k_2-C_2)+\rho_1y_1(\rho_1k_1-C_1))dt $$ ...
0
votes
1answer
75 views

KdV equation - wavebreaking and Galerkin method

I want to show how a wave given by the initial condition: $$ \begin{equation*} \begin{split} u(x, 0) = \left\{\def\arraystretch{1.2}% \begin{array}{@{}c@{\quad}l@{}} 1 - x^2 & \text{for ...
3
votes
3answers
141 views

NDSolve and Plotting

So I am having an issue using NDSolve and plotting the function. So I have two different NDSolve calls in my plotting function. ...
4
votes
1answer
79 views

Substituting ParametricNDSolve for NDSolve

This is my first post so let me know if I need to format things differently. I have been using NDSolve for most problems which optimize parameters for ODEs. I believe that ParametricNDSolve would be ...
0
votes
0answers
60 views

Finding when a ODE returns to starting position

I am trying to discover when these ODE return to their start position. I am using coordinates that have a periodicity of {Pi/2, 2Pi, 2Pi}. To accomplish this I have had to use mod. The ODE are ...
0
votes
0answers
94 views

How to optimize a cost function which involve the solution of a ODE system using the NMinmize?

I have created a cost function, the value of which depends on the solution of a ODE (ordinary differential equation). The parameters of the ODE are not determined, and my goal is to determine them ...
0
votes
1answer
126 views

How to find the zero of a function defined by a non linear differential equation

I need to find the zero of a mysterious function sigma defined by a differential equation of the following form $$u*\sigma'(u)+(1-\chi_0)*\sigma(u)+\sum_{k=1}^{D} ...