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

learn more… | top users | synonyms (3)

2
votes
1answer
111 views

How I can make the StreamPlot of this differential equation?

I need the StreamPlot of this differential equation but I don't know how. dp/dt = 0.4 p(1 - p/30), 0 <= t < 5 and 0.4 p (1 - p/30) - 0.25 p, t > 5
1
vote
1answer
93 views

Animating a 3D shape along path a (2D and 3D) parametric function curve [Update]

I have a 3D object under the action of gravity field.The trajectory of path is a parabola.I would like to animate , as in the example GIF. ...
3
votes
1answer
91 views

Smoothing a unit step function

I want to smooth a unit step function for use in NDSolve so this function is a smooth function of time (t). How can I do the ...
4
votes
1answer
126 views

DSolve misses a solution of a differential equation

[Note that in the cited duplicate, DSolve not finding solution I expected, the general solution returned by DSolve is missing a solution for quite different reasons ...
2
votes
1answer
281 views

Smoothing a single rectangular pulse in NDSolve

Hello I am interested in smoothing out the sharp edges of a single rectangular wave centered at the origin. I am looking for a smooth function that looks almost exactly the same as the square wave ...
10
votes
2answers
201 views

How to use NDSolve with discontinuities at internal boundaries?

I don’t know how to impose discontinuous internal boundary conditions (BCs) in NDSolve, so I’ve set up an example problem to illustrate my issue. Consider the simple first-order ODE for $f(z)$ on the ...
3
votes
3answers
127 views

When using NDsolve, how to determine the positions of steady states?

I am currently trying to numerically solve a set of ordinary differential equations of chemical kinetics. However, I want to implement perturbations only when system reach steady states. For example ...
0
votes
1answer
67 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
1answer
58 views

NDSolve Problems with Cardiovascular Modeling [duplicate]

I am trying to use 27 simultaneous differential equations to model the cardiovascular system. I have the following code, however, the output isn't giving interpolating functions, but rather another ...
0
votes
1answer
51 views

Solving differential equation (Analytical or Numerical)

I want to solve the following differential equation for $0 < x < 1$ ...
0
votes
0answers
37 views

How to get this numerical solution of a integro-differential equation [migrated]

Previously, I ask an NDSolve questions(How to solve the differential equation with Duhamel's integral?), but now a more sophisticated one: ...
0
votes
1answer
32 views

How can one make NDSolve spend less time at irrelevant transient oscillation?

In the solution there is a transient oscillation that is irrelevant. NDSolve spends a lot of time there. Is there a way to optimize it?
1
vote
1answer
90 views

How do I solve this ODE numerically in Mathematica?

I want to solve these equations numerically in Mathematica and plot them. \begin{equation} u'(t)=1.5\,u(t)\,v(t)-u(t) \space \space \space \text{and} \space \space u(0)=0.001 \end{equation} ...
-2
votes
1answer
36 views

NIntegrate a function containing NDSolve

I am having an issue integrating a function for which I am getting values for when I evaluate it. ...
1
vote
1answer
73 views

Solving differential equation but keeping showing running

I am trying to solve this differential equation, see the command below. But the cell keeps showing that it is running without giving any answer for a very long time. Eventually I had to abort it. Does ...
4
votes
1answer
81 views

Substituting ParametricNDSolve for NDSolve

This is my first post so let me know if I need to format things differently. I have been using NDSolve for most problems which optimize parameters for ODEs. I believe that ParametricNDSolve would be ...
0
votes
1answer
75 views

KdV equation - wavebreaking and Galerkin method

I want to show how a wave given by the initial condition: $$ \begin{equation*} \begin{split} u(x, 0) = \left\{\def\arraystretch{1.2}% \begin{array}{@{}c@{\quad}l@{}} 1 - x^2 & \text{for ...
0
votes
0answers
59 views

How to solve two point boundary value problem numerically

I'm new to mathematica and I'm interested in solving the following optimal control problem: $$ \min_{\rho_1,\rho2}\int_0^Te^{-\beta t}(Nd(t)+\rho_2y_2(\rho_2k_2-C_2)+\rho_1y_1(\rho_1k_1-C_1))dt $$ ...
0
votes
0answers
60 views

Finding when a ODE returns to starting position

I am trying to discover when these ODE return to their start position. I am using coordinates that have a periodicity of {Pi/2, 2Pi, 2Pi}. To accomplish this I have had to use mod. The ODE are ...
0
votes
1answer
107 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 ...
0
votes
0answers
96 views

How to optimize a cost function which involve the solution of a ODE system using the NMinmize?

I have created a cost function, the value of which depends on the solution of a ODE (ordinary differential equation). The parameters of the ODE are not determined, and my goal is to determine them ...
3
votes
3answers
143 views

NDSolve and Plotting

So I am having an issue using NDSolve and plotting the function. So I have two different NDSolve calls in my plotting function. ...
0
votes
1answer
88 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 ...
35
votes
2answers
762 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
126 views

How to find the zero of a function defined by a non linear differential equation

I need to find the zero of a mysterious function sigma defined by a differential equation of the following form $$u*\sigma'(u)+(1-\chi_0)*\sigma(u)+\sum_{k=1}^{D} ...
1
vote
1answer
72 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 ...
6
votes
1answer
209 views

Solving $\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$

I would like to solve the following equation: $\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$ I have already posted it here, but still it doesn't work for me (I ...
1
vote
0answers
87 views
-1
votes
1answer
212 views

Some Problem with WhenEvent! [closed]

Anyone knows what's the problem with the following code and how can I fix it? I am not sure that I wrote the WhenEvent section correctly. By the way, I want to solve the equations and then plot y vs. ...
2
votes
2answers
83 views

Finding Minimium Periapse Distance Between Spacecraft and Planet

I have the following simple model that simulates a spacecraft orbiting Mars. What I'm hoping to do is be able to find the periapse radius of the spacecraft as I did below, except instead of using ...
2
votes
1answer
158 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 ...
0
votes
0answers
34 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
4
votes
1answer
153 views

How to vary finite difference approximation order in `NDSolve` at boundaries

According to here, NDSolve, when using the method of lines, creates partial derivatives in the spacial coordinate (lets talk just about one spacial coordinate for ...
5
votes
0answers
37 views

Why DSolve doesn't handle duplicate boundary condition

This code works well. DSolve[{y''[x] + 10 y'[x] == 0, y[0] == 0}, y[x], x] (*{{y[x] -> 1/10 E^(-10 x) (-1 + E^(10 x)) C[1]}}*) But why mma gives ...
13
votes
4answers
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 ...
14
votes
1answer
254 views
1
vote
0answers
48 views

How to use WhenEvent with several conditions?

I would like to use StopIntegration in WhenEvent, when more than one condition should be checked. For example, in the code below ...
2
votes
2answers
162 views

Solving coupled first-order autonomous differential equations

I am trying to run a simulation of a circuit to observe chaotic behavior, and have obtained a set of differential equations from an analysis of the circuit. I thought perhaps I could produce a plot ...
0
votes
1answer
76 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 ...
2
votes
1answer
76 views

Gradients of the NDSolve PDE solution

I would like to understand, how to obtain gradients of the PDE solution obtained with NDSolve. To be precise let us consider a Laplace equation from one of the examples: ...
0
votes
1answer
51 views

Why empty plot (Dsolve solution)?

When I try to plot the DSolve output, I get empty plot. Here is the code ...
12
votes
3answers
4k views

Find all roots of an interpolating function (solution to a differential equation)

I'm trying to find all the roots of the solution to a differential equation. Using NSolve or Reduce I don't get the roots, so I'm using an iterative method which I found in physicsforums.com. This ...
13
votes
1answer
2k views

What method does NDSolve use for solving PDEs?

What is NDSolve's mode of operation? I use it to solve partial differential equations and never gave it too much thought. Recently, I came across this question. ...
8
votes
1answer
833 views

Schrödinger eigenvalue problem in two dimensions (Harmonic Oscillator)

I read here the discussion about how to solve a one-dimensional eigenvalue problem. I am wondering, how can one generalize these methods to two dimensions? For example: ...
5
votes
5answers
304 views

Plot all curves in a table with a single color

I want all of my solutions in a table to be the same color. My attempt: ...
0
votes
0answers
30 views

NDSolve polar coordinates

I need to define a function namely "u" as u[r,Theta,t] in polar coordinates. In fact I need to solve the below equation preferably analytical while numerical solution is also desirable where Alpha ...
4
votes
1answer
465 views

Combining Gravity Turn and Orbit Models

I have a mathematical model for the motion of an orbiting spacecraft about Earth: ...
7
votes
1answer
260 views

Diverging solution to coupled second order ODEs from NDSolve

For a physics application I am considering the radial Bogoliubov-de Gennes equations in two dimensions. In dimensionless form they read as follows $$ \begin{cases} ...