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
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 ...
2
votes
0answers
56 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 ...
1
vote
1answer
103 views

How to solve wave equation with finite elements when material properties vary continuously over a region

I am solving the one-dimensional wave equation over regions where the bulk modulus (and thus the wave speed) vary continuously over a region. The current version seems to assume that the material ...
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 ...
1
vote
1answer
91 views

Solving IDE system using FDM based on NDSolve`FiniteDifferenceDerivative

I wanted to solve the following system of integro-differential equations (IDEs) using finite difference method (FDM). $y_1''(t)+t^2y_1(t)-y_2''(t)+\int\limits_0^t[(t-x)y_1(x)+y_2(x)]\mathrm{d}x=(2+t^...
0
votes
1answer
74 views

Non-linear system of ODEs with positive functions

I would like to solve this non-linear system of ODEs, but I need to tell Mathematica to consider y[t] and x[t] to be always positive. How can I do? ...
1
vote
1answer
81 views

Writing a function that can perform n-times fractional Caputo derivative of order alpha to a function u(x) inductively

I wrote this code, but it fails to give the intended answer which is D^(1/2) three times of x^2. any suggestions to correct this code or write a new one.
0
votes
0answers
27 views

Integrating with ParametricNDSolveValue

I managed to integrate the function F1 given in this post, with ParametricNDSolveVale as follows: ...
2
votes
2answers
199 views

How to solve fourth order differential equation?

I have a differential equation of this type: y[x] - 1 - 2*l^2*y''[x] + l^4*y''''[x] == 0 (where l is a parameter and ...
1
vote
0answers
99 views

How to speed up the production of this plot?

This is a followup question to this question. From these two answers I can build the function sol[r][[1]][t0] as follows: ...
0
votes
1answer
39 views

DSolve not satisfying such kind of initial conditions

I am trying to solve this equation in MMA 11.3 $2 \epsilon s^{\prime \prime}+\frac{1-s}{2 \epsilon}=0$; BCs: $s^{\prime}( \pm 1)=0$ and $s\left(0\right)=0$; The analytical solution is expressed as:$...
1
vote
0answers
43 views

NDSolve: “Stiff system” error returned instead of known smooth solution

I tried to reproduce a known smooth analytical solution with NDSolve but only got ...
1
vote
0answers
41 views

Encountered non-numerical values at (ParameticNDSolve/NDSolve)

I have the following problem: Even though I defined every other constant in the code, using either NDSolve or ParametricNDSolve, ...
2
votes
1answer
68 views

Solving 2D convection-conduction equation via using Fourier integral transform: the disappearance of the convection term?(with code)

I am currently solving a 2D convection-conduction equation. The convection is only working on the x direction. The governing equation and its associated conditions are given as where T is the ...
5
votes
2answers
186 views

Problem combining ParametricNDSolve with NonlinearModelFit

Final Edit: I have found a solution! Specifying Method->"LevenbergMarquardt", Gradient->"FiniteDifference" gives the behavior I am looking for. Huzzah! It appears that the crashing behavior was coming ...
4
votes
1answer
57 views

d-dimensional compiled function in NDSolve

Based on this answer, I understand how to use a one dimensional compiled function in NDSolve. Mathematica NDSolve and 'Compile'? I'd like to be able to use a d-dimensional compiled function <...
5
votes
5answers
765 views

NDSolve solves this ordinary differential equation only “half-way”

This system eqs = {(1/2) Y'[x]^2 == (1 - Log[Y[x]^2]) Y[x]^2, Y[0] == 1} is known to have a simple solution in terms of Gaussian functions, which can be checked ...
0
votes
0answers
37 views

Dynamical PDE system tutorials

Which are some up-to-date tutorials or books on integrating dynamical PDE systems (involving chaos, Shock waves, etc.) with Mathematica 10.0?
8
votes
1answer
102 views

How to solve this partial differential equation for $f$?

I want Mathematica to solve for the function $f$. $f$ satisfies the following constraints. $\frac{\partial}{\partial x} f(x,y) = y$ $\frac{\partial}{\partial y} f(x,y) = x$ $f(0,0)=0$ It would ...
5
votes
1answer
117 views

Non-linear ODE from closed-loop system and Response

I started using Mathematica 12 and ran into difficulties. Namely, I want to compare the results of the calculation of a closed system from Simulink and in Mathematica. I rummaged around a bit on the ...
1
vote
0answers
56 views

Solving an algebraic-differential equation

I cannot find the relevant part in the documentation. Maybe you have a quick solution to my problem. Background Sometimes you want to propagate in time some system of ODEs, but not all the variables ...
0
votes
1answer
71 views

Update initial conditions recursively/sequentially within ParallelTable using NDSolve

I am modelling 3D motion of particles inside a force-field using second-order coupled PDEs, which I solve from time t=t0 to t=t1 with initial conditions x0,y0,z0. I have a total number of "particles" ...
0
votes
1answer
179 views

How to solve this differential equation analytically?

How can I DSolve the following differential equation? Is there an analytical answer to this equation? ...
0
votes
1answer
52 views

Evaluation functions with lower and upper limit ODE?

How do I find the numerical value of y at 0 and also at 1. Here is my code. I appreciate any help. ...
0
votes
1answer
70 views

Matrix of functions

I want to create a matrix of functions. As explained in this question, I can create a matrix of variables: ...
0
votes
0answers
66 views

1D transport equation with Neumann conditions

I'm trying to solve 2nd order differetntial equation of heat transfer-type in a finite system x<0,L>, in particular: ...
0
votes
2answers
56 views

Get the derivative function plot from a NDSolve solution

I been trying to plot the derivative function of j[t], being j'[t]. Here a look to the code. I would appreciate your help. Thank you ...
2
votes
0answers
43 views

Sensitivity analysis of a hybrid system (using WhenEvent) using ParametricNDSolve [closed]

I am trying to do a sensitivity analysis using ParametricNDSolve for a hybrid system. with the following event: ...
8
votes
0answers
269 views

DEigenvalues and NDEigenvalues return different values

In the following example, DEigenvalues and NDEigenvalues return different results despite having identical arguments. Does anyone know why? (I use Mathematica 11.3) ...
5
votes
1answer
107 views

why DSolve in V 12 returned an internal module variables with $ on them in this example?

Fyi, Reported to WRI in case it is a bug. [CASE:4288939] Is this supposed to happen? ...
2
votes
1answer
48 views
3
votes
0answers
108 views

BVP of coupled ODEs with unknown initial values

I want to solve the following 2nd order coupled ODEs: $$ \begin{align} f^{\prime \prime} (r) + \frac{2}{r} f^{\prime} (r) + f (r) g (r)^2 - f (r) + f (r)^3 - \frac{1}{5} f (r)^5 &= 0 \\ g^...
0
votes
2answers
218 views

DSolve can not solve my PDE

I'm having some trouble using Dsolve to solve a partial differential equation. This is my code: ...
1
vote
1answer
134 views

Solving Coupled system of differential equation with NDSolve

I am solving a system with coupled system of differential equation to obtain the time evolution of two vectors. The problem stated here is equivalent to solving Landau Lifschitz Gilbert equationLLG ...
1
vote
0answers
78 views

Extracting a vector from NDSolve solution

I made an NDSolveValue to get the variable ff[t] ...
2
votes
1answer
30 views

Nesting NDSolve, Manipulate and Plot functions

I have a system of differential equations that I'd like to solve for different values of a parameter. I am doing so, by ...
3
votes
2answers
81 views

From f[g[x,t]] to f[g]

How can you change f[g[x,t],t] to f[g,t] ? I have differential equations ...
0
votes
0answers
41 views

How to solve this DE to get a matrix?

I have this DE $ g^{m \bar{n}} g^{r\bar{p}} \partial_t {g}_{m r} \partial_t {g}_{\bar{n}\bar{p}} = X_{i\bar{j}}~ \partial_t{f}^i (t) ~ \partial_t{f}^\bar{j} (t) ~~~ ~~~~~~~~~~~~(*) $ Where ...
5
votes
1answer
101 views

ParametricNDSolve fails when I *don't* print the results

Some updates added to end. Truly minimal exampled added at top. Minimal example: ...
44
votes
1answer
4k views

Analogue for Maple's dchange - change of variables in differential expressions

Maple owns an interesting function called dchange which can change the variables of differential equations, but there seems to be no such function in Mathematica. ...
1
vote
1answer
100 views

How to get the implicit solution of this PDE (Maple can but I don't manage with mathematica)?

I asked this question about the analytical solution of the PDE: $$\partial_t c=\partial_x((c-a)(c-b)\partial_xc) $$ And I was given the answer that Maple gives the following implicit form as a ...
6
votes
1answer
98 views

Suppressing analytical evaluation in NDSolve

I am trying to find a numerical solution to a set of coupled ODEs with NDSolve. Let us say $\boldsymbol{X}$ is a vector, and $\boldsymbol{F}$ is a non-linear vector ...
5
votes
2answers
602 views

Phase portrait of a system of differential equations

I have a set of characteristic equations, obtained by method of characteristics from Hamilton-Jacobi equation $$H(q,x) = (q^2-q)x+(1-q^2)x^2$$ $$\partial_s x = (2q-1)x-2qx^2$$ $$\partial_{-s} q = (q^...
4
votes
1answer
216 views

One term in non-linear equations prevents NDSolve to work

I am currently working on the stratification of the core of the planet Mercury, meaning the formation of a conductive layer at the top of the convective core, with a moving interface between both ...
6
votes
1answer
65 views

How to vectorize this nonlinear ODE system for NDSolve?

I learned a long time ago that NDSolve can often be sped up by vectorizing systems of equations. I've got a problem now that seems ideal for this approach, but I ...
2
votes
1answer
61 views

Cross coupling in DirichletCondition not supported — conflict with documentation?

Mathematica 12.0.0.0 happily solves the trivial coupled differential system as follows: ...
1
vote
0answers
36 views

InverseFourierTransform takes me forever

I am trying to solve complicated PDEs using FourierTransfrom and InverseFourierTransform on Mathematica 12.0, but the code below does not give me a result. I do not get any error messages but the ...
10
votes
2answers
307 views

Solving Cahn-Hilliard equation: LinearSolve: Linear equation encountered that has no solution

I have built the Cahn-Hilliard Eqs. in MMA (Mixed Formulation, second order), However, it doesnot work in MMA using Finite Element. LinearSolve: Linear equation encountered that has no solution. And ...
8
votes
1answer
78 views

Can we construct our own NDSolve`StateData?

NDSolve can be broken into three stages: NDSolve`ProcessEquations processes the equations and sets up an NDSolve`StateData ...