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
2answers
17 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
42 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 ...
0
votes
1answer
33 views

What does error Syntax::sntxb: mean? [on hold]

I am trying to solve a coupled differential equation. I am trying to run it. but it is showing some error. please have a look. ...
0
votes
0answers
63 views

Solving a complex differential equation in Mathematica

Hi there I am new to using Mathematica and need to use it to solve a differential equation where my aim is to find a solution for y in terms of ...
1
vote
1answer
103 views

Solving Ginzburg–Landau Equation in MMA 11.3

Based on the PDE model proposed by @Schumacher Solving a second order coupled PDE system, the one dimensional Ginzburg–Landau Problem I would like to solve such benchmark test: namely: u(x): ...
0
votes
0answers
24 views

Integrating with ParametricNDSolveValue

I managed to integrate the function F1 given in this post, with ParametricNDSolveVale as follows: ...
0
votes
1answer
35 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
39 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 ...
0
votes
1answer
60 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
0answers
94 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: ...
1
vote
0answers
38 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, ...
0
votes
0answers
23 views

How to change the number of iterations for NDSolve with StiffnessSwitching?

If one uses NDSolve with the method StiffnessSwitching, it terminates after 100 iterations if it has failed to satisfy the accuracy or precision goals, providing the best solution found and giving an ...
1
vote
1answer
66 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^...
2
votes
1answer
50 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 ...
1
vote
1answer
71 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.
4
votes
1answer
46 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 <...
0
votes
0answers
34 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
94 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 ...
4
votes
1answer
88 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 ...
5
votes
2answers
165 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 ...
1
vote
0answers
52 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
66 views

NDSolve::ndsv: Cannot find starting value for the variable w [on hold]

I cannot find theNDSolve::ndsv error in this code ...
0
votes
1answer
68 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
65 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 ...
5
votes
1answer
97 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
46 views

Hybrid Systemn Anomalous results while using ParametricNDSolveValue

The hybrid system that I am solving ...
3
votes
0answers
80 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^...
2
votes
0answers
38 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: ...
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 ...
1
vote
0answers
71 views

Extracting a vector from NDSolve solution

I made an NDSolveValue to get the variable ff[t] ...
3
votes
2answers
77 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
39 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 ...
1
vote
1answer
34 views

Coefficient Array from total derivative of expression

I have an expression $$\dot{r}\dot{\eta}+r^{2}\dot{\theta}\dot{\xi}=0$$ where $\eta$ and $\xi$ are both functions of $r,\theta$. In MM I wrote this as ...
1
vote
1answer
92 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 ...
5
votes
1answer
98 views

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

Some updates added to end. Truly minimal exampled added at top. Minimal example: ...
-1
votes
0answers
78 views

Partial differential equation (Boundary condition & Plotting)

I'm trying to plot the nonlinear partial differential equation(PDE). The PDE and boundary condition is like this. ...
6
votes
1answer
84 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 ...
0
votes
0answers
77 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 ...
5
votes
2answers
576 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^...
6
votes
1answer
61 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
49 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 ...
6
votes
1answer
320 views

Solving PDE with unreasonable results

I have a simplified version of my chemical reaction problem. Basically it solves the concentration (ca) and grain (g2) diameter. The ca function is depended on particle diameter R, while g2 function ...
1
vote
0answers
36 views

Manipulating a ParametricFunction to handle units

I have a pretty nice way to handle units on a result from NDSolve, which basically consists of converting all of the units to SI, stripping them, calling NDSolve, and then putting the units back. I'll ...
1
vote
1answer
68 views

WhenEvent error in NDSolve ODEs

I wish to change the term, T'[t] to 0 when S[t]<=0 when I solve ODEs. I have used WhenEvent in my NDSolve part, but it seems not work. The code is ...
3
votes
1answer
66 views

Solve 1D Wave Equation

I wanna model 1D wave equation and plot it, Here is my try so far, ...
3
votes
1answer
95 views

Reconstructing a function from its gradients

I have a list of the components of the gradients, $\partial f/\partial x_i$, of a function $f(x_1,x_2,\cdots)$. Is there some neat way to reconstruct the function $f$? One approach to doing this ...
0
votes
0answers
42 views

DSolve Varying Base on Implementation

I am trying to understand the behavior of a system of equations that is derived from: ...
8
votes
1answer
74 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 ...