Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [differential-equations]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
150 views

How to use NDSolve with limited RAM?

How can I use NDSolve when running out of RAM? The code I am implementing: ...
0
votes
2answers
45 views

Using MinValue with NDSolve

A simplified example looks like this. The basic idea is to maximize fHelper by adjusting \[Alpha] for each ...
2
votes
1answer
63 views

Mathematica 12: avoid crashing when using NDSolve on a large domain

I have a set of coupled PDEs, that I'd like to solve numerically using Mathematica (11.3 or 12.0). The problem is, that I need to solve in on a large domain to make sure that there are no boundary ...
1
vote
1answer
50 views

How do I formulate a Dirichlet boundary condition for which the boundary depends on the other variable?

I am trying to solve the Poisson equation on a cylindrical grid. $$ \frac{1}{r^2} \frac{\partial}{\partial r} r^2 \frac{\partial f(r, \theta)}{\partial r} = n(r, \theta) $$ Analytically, there is ...
3
votes
0answers
53 views

Help implementing Magnus Expansion

The Magnus expansion is a tool to approximate solutions to first-order linear differential equations (the Wikipedia page is quite instructive and concise) - it's particularly useful because all orders ...
1
vote
1answer
71 views

Numerical solution to Differential equation

I want to get the differential solution numerically. I used wolfram alpha. here is the link. I tried this code on the Mathematica file. ...
5
votes
1answer
94 views

Why DSolve gives different answer depending on order of variables: $u(x,t)$ vs. $u(t,x)$?

Using V12 on windows 10. I would think it should not matter if one uses $u(x,t)$ or $u(t,x)$ in the specification of the PDE, as long as everything else is consistent (keeping the initial condition ...
5
votes
1answer
75 views

How Does StreamPlot Handle Singularity or Indeterminates?

I will like to know how StreamPlot finds its way around singular/indeterminate values. Actually, I was thinking of using ...
6
votes
1answer
378 views

Can NDSolve address spherical gravitational collapse?

As far as I know spherical gravitational collapse -of central importance to theoretical physics- is thought to be out of the scope of Wolfram Mathematica. However there are cases, as in this article,...
5
votes
3answers
225 views

Problems with solving PDEs

I am using NDSolve to solve the two equations: ...
0
votes
1answer
71 views

DSolve returns unevaluated(I need a closed or numerical solution for this system and plot solution)

I am trying to find a solution to this system of differential equations but the program gives the same output without any messages. I would like help. Please find the Mathematica code posted here. a ...
0
votes
0answers
61 views

Next maximum plot with results from NDSolve

I want to produce a Next-maximum-plot, i.e., I want to plot all local maxima $m_{i+1}$ against the local maximum $m_i$ in order to check for chaotic behavior. In particular, I have the following code:...
2
votes
0answers
94 views

Why doesn't NDEigenSystem give smooth eigenfunctions? [closed]

I'm looking for smooth solutions of the 1D Helmholtz equation $\left[\frac{d^{2}}{dx^{2}}+k_{0}^{2}\epsilon(x)\right]\phi=0$ with homogeneous Dirichlet boundary conditions, where the permittivity $\...
3
votes
1answer
63 views

Unexpected error when implementing FEM in MoL SpatialDiscretization

I cannot figure out why the following piece of code ...
4
votes
2answers
83 views

MoL: How to enforce Chebyshev–Gauss–Lobatto points in SpatialDiscretization?

In Mathematica documentation one is prompted to use a grid with points at the zeros of the Chebyshev polynomials so that Runge's phenomena arising from ...
2
votes
1answer
67 views
0
votes
0answers
28 views

Manipulating a One-Dimensional Plot of ParametricNDSolveValue

I am trying to use manipulate with a plot of a numerical solution to a system of two coupled differential equation solved using ParametricNDSolveValue. I have ...
1
vote
1answer
62 views

Why does domain size change results of NDSolve? / How to overcome this?

this is a follow-up on a previous question which was answered, but it turned out that I was running in circles... I have the following code: ...
0
votes
1answer
57 views

How to solve for a Diff Eq? [closed]

Solve the differential equation y'(x) + x * y(x) = 0, where y(0) = 3. Show your solution is correct; that is, plug it back into the original DE and show it works.
0
votes
0answers
47 views

ReplaceAll error on trying to extract solutions the results of DSolve

I'm trying to solve symbolically a system of differential equations (simplified example): ...
5
votes
1answer
202 views

Thermal conduction (Annulus, 2D): Missing boundary conditions

The thermal conduction problem, described in polarcoordinates can be solved ...
1
vote
1answer
49 views

Elimination of numerical error in initial data

Elimination of numerical error in initial data can be crucial for its subsequent evolution. In the following simple example ...
2
votes
1answer
44 views

TemporalDiscretization in MethodOfLines

When solving ODE's one can use options like MaxStepFraction to control the number of grid points. When solving PDE's ...
3
votes
1answer
67 views

Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
1
vote
0answers
51 views

problem of NDSolve with solving a simple BVP

I'm trying to solve a simple BVP of the following equation $-10.625 + 16.75 u - 7.5 u^2 + u^3 + 4 e^{0.5(u-2.5)^2}f''(u) = 0$ on the interval of $[0,5]$ with boundary conditions $f[0]=0$ and $f[5]=...
1
vote
1answer
82 views

Solving system of PDEs with NDSolve

I am trying to solve a system of coupled PDEs with zero-flux boundary conditions on a large domain. I have two problems: 1) Is there a possibility to use results of NDSolve as inititial conditions? ...
0
votes
0answers
40 views

Plotting the solutions of parametric NDSOLVE[] as a function of its parameters

I am trying to solve a 2 set of coupled differential equations one using parametricndsolve and other using *ndsolve . So far I am successful in solving these equations. The solution I found by using ...
0
votes
1answer
66 views

Solving a system of linear differential equations [closed]

I am trying to solve a system of linear differential equations, and I am following the instructions given on the Wolfram Alpha page. I am not getting the desired output, as can be seen below: In the ...
0
votes
1answer
47 views

Solution of non linear coupled equations by using shooting, block and StartingInitialConditions

My code is not giving out put. Moreover i do not know how to copy paste this code from my note book. is there any easiest way to paste here. I m plotting graph for the different values of R. I have ...
3
votes
1answer
95 views

Solving a stiff nonlinear ODE system

The system I am trying to solve is simple, but looks pretty stiff and I have unsuccessfully tried to solve it with StiffnessSwitching. It is the following one: <...
3
votes
1answer
153 views

How to Solve $y'(x)=x\ln(y(x))$ with $y(1)=1$ using DSolve

The solution to $y'=x \ln(y)$ with initial conditions $y(1)=1$ is $y=1$. How to persuade DSolve to obtain this solution? ...
5
votes
1answer
141 views

One dimensional heat exchange on a ring: Periodic solution

Subsequent I consider the transient heat exchange problem of a ring in polar coordinates. The ring is heated in a small range 0<\[CurlyPhi]<20° and cooled ...
1
vote
0answers
48 views

Solving coupled differential equations with 4 unknown constants

Recently I just started Mathematica for solving differential equations. Then I tried following 7 coupled differential equations with four unknown constants $ (a, b, c, d) $. But after completion of ...
2
votes
0answers
70 views

Solving 2D Integro-Differential equation numerically

The following problem was given to me by a friend, so I can't really guaranty that a solution exists, but if, I certainly can't find it myself... Let us consider the following Integro-differential ...
0
votes
0answers
46 views

NDSolve 1/0 error

I'm having trouble to solve a differential equation with NDSolve. Does anyone knows how can I get rid of this problem? ...
2
votes
0answers
36 views

DSolve 4 variables function error

Mathematica version: 12.0.0.0 I'm trying to solve 2 basic differential equations; ...
0
votes
2answers
75 views
0
votes
0answers
70 views

Using ParametricNDSolve for coupled differential equations

I am trying to solve two coupled equations. I have one parameter, namely c, in the program given below. What I am trying to find is the solution for the coupled ...
5
votes
1answer
127 views

Understanding PeriodicBoundaryConditions

Every thing works fine in a simple example with periodic boundary condition u[ 2,y]==u[0,y] from documentation of ...
3
votes
1answer
86 views

Problem with complex eigenvalues in periodic Sturm-Liouville problem

I'm having trouble using NDEigenvalues to obtain the first few eigenvalues for a differential operator on the circle of radius one-half. $\qquad Lf(x) = f''(x)+ (-...
6
votes
1answer
221 views

Controlling dynamic time step size in NDSolveValue

Statement of problem I'm writing a script to calculate the temperature of a 2D system with time-dependent heat deposition. The heat deposition is a square wave pulse of duration w = 10^-6 seconds, ...
9
votes
1answer
190 views

Finite element for coupled 1D and 3D equations

This is a renewed post for this question, since the old post is already 2 years old and the problem hasn't been solved completely. The problem is to solve heat conduction with robin type boundary ...
5
votes
1answer
167 views

How to increase NDSolve accuracy for 2nd order ODE?

My attempt to NDSolve a 2nd order nonlinear ODE ...
1
vote
1answer
62 views

NDSolve: Boundary conditions not numerical

I am trying to solve coupled differential equations using NDsolve. I am getting an error which says Boundary conditions not numerical. I am not sure about my mistake. Can I get some help? My code ...
3
votes
0answers
86 views

How do I truncate an interpolating function?

I have a very large interpolating function and want access the function at one point in time. I am running out of RAM running ...
-3
votes
1answer
77 views

Help me to fixe the errors in my code [closed]

This code does not give me the expected plot, so please help me. ...
2
votes
0answers
57 views

NDSolve 3D Poisson PDE (cylindrical coordinates)

I try to model the threedimensional heating problem of a flat cylinder which is heated along the circumference and cooled along the face side. The temperature ...
0
votes
0answers
50 views

How to apply the utility Packages for Numerical Differential Equation Solving

I have solved two coupled equations with {Solf, Solg} = NDSolveValue[eqns, {f, g}, {x, 0, L}, {t, 0, tmax}] and want to extract the computational grid ...
0
votes
2answers
37 views

NDSolve: How to perform a reverse integration consistency check?

Let there be the following NDSolve code: s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}] I think it ...
0
votes
0answers
57 views

Stiff system of ODEs

I'm trying to solve a system of differential equations with NDSolve, but I get the error message: NDSolve::ndsz: At lnP == -21.0018, step size is effectively ...