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

learn more… | top users | synonyms (3)

4
votes
0answers
69 views

How do I programatically set up an NDSolve with lots of equations?

I'd like to set up... NDSolve[x1'[t]==2,x1[0]==0, x2'[t]==2,x2[0]==0, x3'[t]==2,x3[0]==0, x4'[t]==2,x4[0]==0, x5'[t]==2,x5[0]==0, ... etc Can I somehow use ...
32
votes
2answers
1k views

Variable naming changes everything

Bug fixed in 10.0.0 I am having a rather unusual problem I do not understand with Mathematica where renaming one of the variables of my function causes the function to stop "working". Here is the ...
6
votes
1answer
104 views

Accuracy of Grad-Shafranov PDE's NDSolveValue over implicit region

Context I need to solve for the toroidal flux of the magnetic field above an accretion disc. For this purpose, I define the region over which the flux is non zero, ...
13
votes
2answers
1k views

Neumann boundary conditions in NDSolve over nontrivial region

The problem I would like to solve involves diffusion in the following region ...
3
votes
0answers
66 views

Verification of results given by NDSolve

I am trying to solve a system of ODEs using NDSolve. The differential equations used are obtained by applying method of lines to actual governing equation. The system includes differential equations ...
0
votes
1answer
83 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
2answers
81 views

Matrixform ndsolve for mobile robot dynamic equations

Error is: NDSolve::ndsdtc: The time constraint of 1.` seconds was exceeded trying to solve for derivatives, so the system will be treated as a system of differential-algebraic equations. You ...
17
votes
2answers
251 views

Getting rid of spikes in the PDE solution

Preamble: I am solving a PDE in a domain representing a rectangle 10X10 with several circular holes, say, like this one (n is the number and r is the radius of the holes): ...
15
votes
5answers
14k 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 ...
0
votes
1answer
125 views

Plotting a NDSolve solution

I'm working on a neutrino oscillations problem, and am running into issues ploting the solution to my differential equations. The equations have non-analytic solutions so I'm using the ...
6
votes
1answer
108 views

Kernel Crash while using “ValuesOnGrid” method of InterpolatingFunction

I was experiencing some kernel crash while using "ValuesOnGrid" method of an InterpolatingFunction returned by ...
0
votes
1answer
46 views

Ndsolve parametricplot

Ndsolve solution cant manipulate parametric plot!! ...
1
vote
0answers
45 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
78 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
0answers
81 views

Breather Rib parametrization from given code

Please help find expressions for principal curvatures $\kappa_1,\kappa_2 $ with a convenient parameterization using Mathematica code (R. Palais/Xah Lee) given. It is tough on me to handle the PDE ...
36
votes
2answers
835 views

Numerically solving Helmholtz equation in 3D for arbitrary shapes

Context While studying manifold Learning I got interested in finding the eigenvectors of the Laplacian. (also in connection to this problem of solving the heat equation) Following this and that ...
0
votes
1answer
104 views

NDSolve issue with initial and boundary conditions

While solving the heat equation in one spatial variable $u_t = u_{xx} $ (x goes from 0 to L) with the initial temperature distribution $T_0 \frac{x(L-x)}{L^2}$ , and with neumann boundary conditions ...
0
votes
2answers
69 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 ...
2
votes
1answer
43 views

Problem with NDSolve and Sign

If c1 cnd c2 are zero, the code responds very well; but if one of c1 or ...
3
votes
1answer
195 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 ...
1
vote
1answer
95 views

non linear Least Squares with model function given by ODE's

I have to fit to experimental data a model function given by a linear combination of functions y1(t) and y2(t) a1*y1(t) + a2*y2(t) with a1 and a2 ...
2
votes
0answers
88 views

Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
2
votes
1answer
88 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 ...
2
votes
1answer
181 views

How can I invoke the solution of NDSolve to determine a parameter in my equation just inside NDSlove?

I am trying to solve a differential equation by NDSlove for $h(x,t)$. It reads $$h_t=h_{xx}-V_h-\lambda(t)$$ where $V_h$ is a given function of $h(x,t)$ denoted by ...
6
votes
1answer
102 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
84 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} ...
3
votes
1answer
89 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: ...
25
votes
2answers
2k views

Complex valued 2+1D PDE Schrödinger equation, numerical method for `NDSolve`?

Based on the heat equation of the Mathematica Manual tutorial, I wrote the complex counterpart (Schrödinger) equation, for the free particle propagation of an initial wavepacket. ...
1
vote
1answer
94 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
54 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 ...
3
votes
1answer
99 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 ...
5
votes
2answers
259 views
0
votes
1answer
87 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] ...
0
votes
1answer
115 views

Numerical solutions of Gross-Pitaevskii equation

I am trying to solve the Gross-Pitaevskii equation numerically and I am trying to use NDSolve. Nevertheless it is become a dead end. The problem is boundary and ...
0
votes
0answers
71 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 ...
2
votes
0answers
58 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 ...
4
votes
2answers
134 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? ...
2
votes
1answer
613 views

What does the Error Message in DSolve really mean?

Having this ordinary non linear differential equation $$y'-x^2 (y+1)\cdot (y-2)^2= 0$$ with the boundary condition $y(4)=2$. When trying to solve this one with Mathematica by using ...
0
votes
1answer
90 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 ...
3
votes
3answers
81 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. ...
1
vote
1answer
83 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 ...
0
votes
1answer
119 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
80 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: ...
0
votes
0answers
66 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 ...
2
votes
3answers
125 views

Solving a differential equation with NDSolve and plotting it WITH the use of Manipulate

I want to solve, let's say, this differential equation: y'[x]=y[x]^n Given any initial condition (which I might want to manipulate too). I want to plot the ...
2
votes
1answer
47 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
1answer
62 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
508 views

Animated Wave propagation using split operator method

Here is the state of the art: By solving the time-dependent Schrödinger equation, one obtains that the propagated wave function after time step $\Delta t$ can be calculated by applying the ...
1
vote
0answers
85 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
60 views

Stopping NDSolver at time of error

I am using NDSolver and WhenEvent to solve a system of differential equations. I get this message: ...