New answers tagged differential-equations
2
votes
Accepted
Post Processing of Solution and Plot of Coupled Partial Differential Equation Over a Semi-Circular Domain
I can't get the same exact plot for the second part. This is what I get
This is the code. Feel free to change it as needed.
...
3
votes
Accepted
Solution and Plot of Coupled Partial Differential Equation Over a Semi-Circular Domain.II
Since you used NDSolveValue to solve the first PDE, then you can use that solution in the second PDE using sol1[r,θ] and not as ...
2
votes
Accepted
NDSolveValue result contradicts initial condition
Let's have a look at the mesh that is automatically generated:
Needs["NDSolve`FEM`"]
mesh = ToElementMesh[rg]
Now, we evaluate the ic at the coordinates ...
0
votes
Accepted
Solve Differential Equation Numerically
First, consider the case d = 0:
eq0 = y''[x] - Exp[y[x]] + Exp[-2 y[x]] + 1;
with y'[0] == 30 and ...
2
votes
3
votes
Plot general solutions
Mathematica does not give an explicit solution, because it can't integrate the integrals.
In addition, even it it did, you can't plot the solution since $A$ is not known. Even giving $A$ a numerical ...
0
votes
A way to generalize my code for this non linear ODE problem
Here is an example how to solve for F.
...
1
vote
Accepted
Adding symbolic functions and manipulating results of DSolve
$Version
(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)
Clear["Global`*"]
eqn = y''[x] + w^2 y[x] == A Cos[q x];
Ask for the ...
3
votes
Accepted
Solution of Dimensionless Partial Differential Equation Over a Semi-Circular Domain
Another approach:
When dealing with numerical solvers, discontinuities introduced by functions like HeavisideTheta can pose significant challenges. These ...
4
votes
Solution of Dimensionless Partial Differential Equation Over a Semi-Circular Domain
Replacing HeavisideTheta with Piecewise makes it work. it could be a limitation of NDSolve. I do not know.
...
2
votes
0
votes
Labelling vector state variables for solution of system of ODEs
I'm guessing the output of a working DSolve call is something like this:
...
2
votes
A code for producing system of equations for central difference method
to generate the equations, just use Table command. To solve them is different issue. Since they are non-linear.
$$
y^{\prime\prime}=y+\sin\left( y^{\prime}\right)
$$
3 point centered difference for $...
1
vote
Accepted
Solving differential equation with hyperbolic functions
These is a simple integral problem
...
1
vote
Accepted
How to plot a differential equation?
If Q,a are given constants your equation gives an implicit result x[R]
...
1
vote
Accepted
FEM solution for onedimensional boundary value problem doesn't evaluate
That's a typo: You used
"MaxCellMeasure->0.1"
but you should use:
"MaxCellMeasure" -> 0.1
2
votes
How to numerically solve symmetric top with fixed point motion equations with Mathematica?
This is Manipulate of Symmetric top gyroscope motion. It has many options to explore the dynamics. I wanted to improve it more, but no time now. But it works and has many options to play with.
Code
<...
0
votes
Solving Geodesics from Christoffel Symbols
In an earlier comment I made, I mentioned that the term Exp[g[t] + f[r]] was common to all the spatial terms in your metric, and that you might want to consider factoring the exponential and ...
1
vote
Axisymmetric cylindrical Laplace's equation with a boundary condition at infinity
Oblate spheroidal coordinates are
...
0
votes
How to force Wolfram solve the ODE with respect to h[s]?
but what should I print?
Mathematica can't solve it analytically. Even if you replace all other terms by parameters
...
0
votes
How to reduct the terms of differential equation?
The dots . in the definition of detG seem to be wrong I think
Try
...
1
vote
Mathematica thinks that an initial condition is a boundary condition
Here is a way to solve it. Note that there is no need for the NeumannValue, as the 0 NeumannValue is the default. I have changed the initial condition on R and gave ...
3
votes
Accepted
2
votes
Accepted
Set of differential equations with trigonometric functions and a derivative squared
In this post we answer the question how to extend periodic solution t[y] up to $4 \pi$ and how to compute solution in a case of ...
4
votes
Accepted
Modeling Infection Spread among Different Age Groups with Contact Matrix
I really enjoy your epidemic series :-) It is always better to decouple the weedy details of a specific model from the key question. Key question should be purified to bare minimum. Perhaps helpful, --...
3
votes
Set of differential equations with trigonometric functions and a derivative squared
Try numerical solution NDSolve[...,Method->"StiffnessSwitching"].
Solutions seem to be complex, is this intended?
...
11
votes
Accepted
The Poincaré Sections of Yang-Mills-Higgs System
I'm currently co-developing an interactive tool for extracting Poincaré sections from Hamiltonian systems. I've got a preliminary version up and running, so feel free to use it. It's available on the ...
9
votes
The Poincaré Sections of Yang-Mills-Higgs System
If we take icv from your second example and define Hamiltonian as
...
1
vote
Accepted
Evaluation and plot the result of NIntegrate obtained from NDSolve
Your definitions (keep h undefined)
...
4
votes
Accepted
Solving coupled differential equations involving the square of the derivative
There are 2 branches in the analytical solution with variable p=pt,
...
3
votes
Solving coupled differential equations involving the square of the derivative
I'll let you do the plotting. But these are not coupled ode's. The y[s] ode does not depend on t[s]. So you can solve that on ...
0
votes
Solving Geodesics from Christoffel Symbols
On my first post, I found the geodesics equations found from Christoffel symbols:
...
0
votes
Solving Geodesics from Christoffel Symbols
Euler-Lagrange equation for geodesics produce the Christoffel symbols as coefficients of the products of velocities in the equation of motion, solved for the second order derivatives of the ...
0
votes
How can I obtain the temperature profile from a pressure profile of a partially filled rotating cylinder?
For getting an image from the above code define $h, \rho, \omega$ and
r[x_,y_]:=Sqrt[x^2+y^2]
The ideal gas local state equation for a volume element reads
$$p(r,z) \ r^2 \ d\phi\ dr\ dz = \rho(r,z)...
1
vote
Plot the evaluated results of NDSolve
modified
Here my approach (Mathematica v12.2) solving the problem with Shootingmethod Method->"Shooting"
...
1
vote
3
votes
Accepted
What are some ways to speed up calculations
These can be calculated once:
Bs = {0, 0.5, 1, 2, 5, 7};
entable = Table[en[B], {B, Bs}];
Then using the pre-calculated table
...
2
votes
Accepted
Axisymmetric cylindrical Laplace's equation with a boundary condition at infinity
Mathematica cannot DSolve a general linear PDE with nonconstant coefficients.
The Laplace equation for cylindrical coordinates separates into products of three functions of the variables.
$$\frac{1}{r}...
1
vote
How to numerically solve symmetric top with fixed point motion equations with Mathematica?
The use of the Hamilton function (energy) in terms of the velocities for deriving equations of motion is always a dangerous mistake.
Use the Lagrangian equations (trivial with two constant angular ...
1
vote
Accepted
0
votes
2
votes
Accepted
Plot several graphs of a function density distribution using Table
DensityPlot has the Attibute "HoldAll":
Attributes[DensityPlot]
{HoldAll, Protected, ReadProtected}
Therefore, if you want to evaluate "ps[B]" ...
1
vote
Accepted
Need help solving cylindrical Laplacian
You'd need to use Cartesian coordinated (or use a RegionSymmetry). Something like this should get you started:
...
1
vote
How do I get a coefficient matrix from a second order ODE's system?
Looking what you have done aboove in your ask, I did it (turn a 2nd order ODE system in 4 equations 1st order ODE system). But, as I said, I need to comper this 2 situations (2nd order ODE system, ...
3
votes
How do I get a coefficient matrix from a second order ODE's system?
\begin{align*}
x^{\prime\prime} & =\frac{k_{2}}{m_{1}}y-\frac{k_{1}+k_{2}}{m_{1}}x\\
y^{\prime\prime} & =\frac{k_{2}}{m_{2}}x-\frac{k_{3}+k_{2}}{m_{2}}y
\end{align*}
Let $x_{1}=x,x_{2}=x^{\...
1
vote
How do I get a coefficient matrix from a second order ODE's system?
Using CoefficientArrays:
...
2
votes
Accepted
SIR Parameter Estimation in Mathematica
It looks like we try to estimate parameter $\beta$ with known $\gamma, \mu$ using one point only reportedData = n*0.08. In this case we can compute $\beta$ as ...
3
votes
Accepted
Convert R code to Mathematica code of Poisson log-likelihood for the epidemic curve
It looks like we need to compute $\beta, \gamma$ using optimization with NMinimize in the form
...
2
votes
Accepted
NDSolve is not picking the correct initial condition
This is a discretization problem. One needs to refine the spatial grid. One can see that the OPs NDSolve does in fact satisfy the initial condition, but only at 25 ...
2
votes
NDSolve is not picking the correct initial condition
This is a problem of machine precision. Rationalize all constants and increase "WorkingPresision" to e.g. 26
...
Top 50 recent answers are included
Related Tags
differential-equations × 7308numerical-integration × 1198
equation-solving × 1058
plotting × 947
finite-element-method × 880
numerics × 582
nonlinear × 449
calculus-and-analysis × 367
physics × 311
boundary-conditions × 287
warning-messages × 283
symbolic × 227
parametric-functions × 182
boundary-condition-at-infinity × 167
eigenvalues × 147
interpolation × 141
heat-equation × 126
performance-tuning × 124
event-detection × 124
bugs × 119
mathematical-optimization × 117
manipulate × 116
list-manipulation × 108
fitting × 106
integral-equations × 103