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

learn more… | top users | synonyms (3)

1
vote
0answers
52 views

Transient PDE with a complex boundary condition

I am trying to solve a PDE, but one of the boundary conditions is complex, because it includes an integral over the function that I am looking for. The code is shown below ...
0
votes
2answers
92 views

NDSolveValue and DirchletConditions for cylindrical disk

my aim in this is to model the current flow of a cylindrical disk with one end set to potential 0 and the other end set to potential 1. In this section of code I am trying to find the scalar ...
2
votes
1answer
55 views

Problem with NDSolve and Sign

If c1 cnd c2 are zero, the code responds very well; but if one of c1 or ...
0
votes
2answers
72 views

Not seeing line defined in an Epilog option

In the following code, the line defined in Epilog option of my 2nd parametric plot doesn't show up in the content pane of my ...
18
votes
2answers
283 views

Getting rid of spikes in the PDE solution

Bug introduced in 10.0 and persisting through 10.2 or later Note: In 10.0, Rationalize[fd, 0] was needed or mesh generation would fail. Preamble: I am solving a ...
2
votes
1answer
90 views

Why does NDSolveValue giving crappy results?

I have been trying out mathematica 10 features, but sadly unable to use NDSolve for even simple PDE's. I am still wrestling with the problem of boundary conditions. The solution I get in the ...
1
vote
1answer
90 views

solving system of non-homogeneous advection equation using mathematica?

This question is followed up from this question How to solve a certain coupled first order PDE system Here I consider the non-homogeneous advection system \begin{equation} ...
4
votes
1answer
267 views

Using ParametricNDSolve and NMinimize to find accurate interplanetary trajectory arrival periapse radius

I have an interplanetary trajectory simulation that calculates the required velocity (using a Lambert solver) and escape angle for a spacecraft to travel from Earth to Mars. This model does not use a ...
2
votes
0answers
104 views

Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
3
votes
1answer
98 views

Nonlinear PDE solver

I would like to solve the following nonlinear PDE: $$ \frac{\partial^2 \phi}{\partial x^2} - \frac{\partial^2 \phi}{\partial t^2} = \lambda |\phi|^2 \phi $$ I was trying: ...
6
votes
1answer
118 views

ParametricNDSolve[ ] and NMinimize[ ] in Combination

I have the following code that is used to simulate a spacecraft orbiting Mars, and uses ParametricNDSolve to vary the spacecraft's initial conditions using a parameter value ...
1
vote
1answer
102 views

How to solve a certain coupled first order PDE system

I would like to find the solution $(U,V)\equiv (U(x,t),V(x,t))$ of the following system. \begin{equation} \displaystyle\left\{\begin{array}{l} \frac{\partial U}{\partial t}+(a+b x)\frac{\partial ...
0
votes
1answer
70 views

NDSolve precision for non-linear ODE with variable initial conditions

I am trying to numerically solve a non-linear ODE with variable initial conditions, specifically it is : $$ \partial_{t}R (r,t) ^2 + 2 R(r,t) \partial_{t} ^2 R(r,t) +r^2 k(r) = 0 $$ and my initial ...
0
votes
1answer
89 views

Variable dependency…easy one

I'm brand new to Mathematica...should be an easy one. Instead of writing u[x] everywhere in the code, how do I assign the dependency early on like this: u=u[x] ...
2
votes
0answers
67 views

How to solve heat equation with Robin type conditions with NDSolve?

Could you help me please to solve following problem! I need to solve one-dimensional heat equation with Robin type boundary conditions. But Mathematica find only constant solution with no dependence ...
0
votes
0answers
72 views

How to extract the time t of an interpolated function created by NDSolve? [duplicate]

I'm working with the function NDSolve. I give it the time of integration, the time I want it to evaluate my differential equations. Sometimes, it crashes before the end of its attribuated time ; For ...
3
votes
1answer
110 views

Specifying NeumannValue for Axial load instead of transverse load (Plane Stress situation)

I am trying to simulate a bar/link element under axial tensile load. The link is of unit thickness and I may use a plane stress model. A plane stress model is an approximation that may be used for ...
0
votes
1answer
91 views

second order nonlinear ode

I need to solve the following equation for $u_n(t)$: $u''=\frac{u'^2}{2u}+\frac{3u^3}{2}+4tu^2+2\left(t^2+\frac{n}{2}+(2p+1)\frac{1+3(-1)^n}{4}\right)u-\frac{n+(2p+1)(1-(-1)^n)}{4u}$ where $p$ is a ...
4
votes
2answers
138 views

FEM giving “ … is not a polynomial error”

Executing the program below I get the ... is not a polynomial error message. I don't have an idea why I am getting this -- any suggestions? ...
0
votes
1answer
126 views

Solve a differential equation using the power series method

I used the power series method to solve the differential equation y’’+y=0 with y[0]=0 and y’[0]=1 using the following code. In this code “y” is considered as “y = Sum[c[i] x^i, {i, 0, n}] + O[x]^(n + ...
0
votes
1answer
81 views

Solving a simple linear differential equation does not work as advertised [closed]

I have been following examples in an introduction to Mathematica. But the following example regarding a linear differential equation does not work: ...
1
vote
1answer
87 views

Nonlinear boundary value problems for fourth order ordinary differential equations

I am trying to solve a set of equations which are fourth order equations. I want to get the value of w ...
1
vote
1answer
69 views

Ndsolve problem with Sign

Using Sign(...)] in the formulation of my system of ODEs is causing an error that I don't know how to correct. If I use (...) in ...
2
votes
1answer
49 views

Non-autonomous Dynamical system Sliding mode controller Error

This code is a simulation of a sliding mode controller of a non-autonomous dynamic. When I use ArcTan in input, I receive an error. ...
1
vote
0answers
98 views

Solution to heat equation with Neumann boundary conditions and lateral heat loss

I am conducting an experiment on heat conduction in a copper rod. To do so I am using a thin copper rod with several temperature probes, then I am going to compare the data with a solution to the heat ...
2
votes
1answer
63 views

Stopping NDSolver at time of error

I am using NDSolver and WhenEvent to solve a system of differential equations. I get this message: ...
0
votes
0answers
38 views

ParametricNDSolve of differential equation with singularity

I have a differential equation I would like to solve with the ParametricNDSolve. However, the coefficients in the differential equation are singular at a certain value, so sometimes NDSolve crashes ...
2
votes
1answer
105 views

solve nonlinear equations with NDSolve

I am trying to solve a set of equations with NDSolve. one of them is mg*yg''[t] == NN[t] - kb*yg[t]^1 - cb*yg'[t], When the power of yg[t] is 1 the equations could ...
3
votes
1answer
84 views

How to control when NDSolve is called inside Manipulate

Let's say I have a function which returns the resulting function of a differential equation solved by NDSolve: ...
3
votes
3answers
89 views

Infinite Expression Error NDSolve

I'm trying to figure out why I am consistently getting an infinite expression error when I'm trying to solve this DE using NDSolve. Any help will be appreciated. ...
0
votes
1answer
70 views

NDSolve There are fewer dependent variables, {V[S,t]}, than equation

I am trying to solve the BlackScholes PDE for Barrier option. It works fine for european barrier, but errors out on american boundary condition ...
0
votes
0answers
72 views

PDE with Laplacian time derivative term

Using Mathematica 9 I am trying to solve the 2D PDE: c1*Laplacian[-u[x,y,t],{x,y}] + c2*D[Laplacian[-u[x,y,t],{x,y}],t] == 0 (Eq.1) with time-dependent Dirichlet ...
0
votes
1answer
50 views

NDsolve with discontinuous non-numeric PDE coefficients

I want to solve the heat diffusion equation with variable thermal conductivity. So I have the following code ...
0
votes
0answers
45 views

NDSolve : Solve a single variable-coefficient ODE as series of constant-coefficient ODEs

I have a manipulator equation of the form: $M(q){q''} + C(q,q')q'+G(q) = {0}$ where $M, C$ are $6$ x $6$ matrices, and $G, q$ are $6$ x $1$ vectors and $q$ a function of time. ...
0
votes
1answer
55 views

Obtain constant from DSolve [closed]

I need to extract constant C[1] from expression which I get when solve equation. i.e. DSolve[y'[x]==1/(2x),y[x],x] In result Mathematica gives me this one ...
0
votes
1answer
61 views

Evaluate NDSolve within NDSolve

So I am attempting to solve a differential equation which includes a differential equation (i am not sure if this why my code is giving problems). I am pretty sure that everything is as its supposed ...
1
vote
0answers
38 views

DSolve -> no results

I am trying to solve a system of differential equations. ...
1
vote
1answer
140 views

How to solve the following fourth order partial differential equation including Laplacian

I wish to solve the following fourth order partial differential equation including Laplacian with the boundary conditions with the initial conditions ...
6
votes
2answers
171 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
140 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
98 views

Problem with NDSolve: derivative interpreted as square [duplicate]

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
62 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
84 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} = ...
2
votes
0answers
87 views

Converting integral equations to differential equations

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 ...
5
votes
0answers
82 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
1answer
85 views

Solving non-linear ODE analytically in mathematica [closed]

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
52 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
81 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 ...
3
votes
3answers
143 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
107 views