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

learn more… | top users | synonyms (3)

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 ...
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. ...
4
votes
1answer
79 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
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
0answers
94 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 ...
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} ...
0
votes
0answers
34 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
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 ...
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 ...
5
votes
1answer
86 views

Why does DSolve give a different result than NDSolve?

When I try DSolve to solve a system: ...
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 ...
0
votes
1answer
75 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 ...
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 ...
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 ...
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
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
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 ...
0
votes
0answers
51 views

Isolate graphic components in Manipulate

I have cobbled together two Wolfram Demonstration files to produce the code below. My objective is to generate the phase plane plot on the left side of the output by clicking in one of the regions of ...
2
votes
2answers
161 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 ...
1
vote
0answers
59 views

How to Implement a “Function Object” suitable for NDSolve and Finite Element Method?

I have a bunch of methods that shoud return an expression that behave like a function, i.e. an expression that, when supplied with suitable arguments, evaluate to something. A simple ...
4
votes
1answer
182 views

DSolve returns a wrong solution

This wrong solution exists from mma9 to mma10.1: ...
5
votes
0answers
65 views

Kernel Crash while using “ValuesOnGrid” method of InterpolatingFunction

I was experiencing some kernel crash while using "ValuesOnGrid" method of an InterpolatingFunction returned by ...
1
vote
1answer
63 views

Substituting inside a differential equation

x y''[x]+2y'[x]+l^2 x y[x]==0/.y[x]->Cos[x] I think above code shows what I want to do quite clearly. How do I make it happen. Only y[x] is replaced.
0
votes
0answers
72 views

Which platform is ideal for performance?

I have been using NDSolve, and I noticed that when you decrease the maxstepsize, possible singularities are resolved. If I decrease the step size past a certain point (less than 0.01), Wolfram Engine ...
0
votes
1answer
63 views

DSolve with piecewise coefficeints wrong, why?

sorry if this is a duplicate (I am pretty sure) but I was not able to find the question. I am playing around with DSolve with variable coefficients. In the documentation it is said, that DSolve can ...
1
vote
1answer
58 views

Piecewise Function within NDSolve

So I am quite new to Mathematica and programming in general and I am running into an issue while trying to use the numerical diff eq solver (NDSolve) within mathematica. This is what my code looks ...
2
votes
2answers
124 views

Strange Boundary NDSolve Problem

Mma10.1 doesn't work with the following boundary problem: ...
1
vote
1answer
44 views

Multiplying two parametric solutions

I'm solving two (1-parameter) differential equations and I want to plot the product of their solutions, how do I do this? Here's the code, ...
0
votes
2answers
107 views

Formatting the results from solving a differential equation

{{x[t] -> 600 (t + I π t - 50 Log[50] + t Log[50] + 50 Log[50 - t] - t Log[-50 + t])}} After solving a differential equation, I get an answer in a form where I ...
7
votes
2answers
259 views

How to solve the differential equation with Duhamel's integral?

How do I solve a differential equation with Duhamel's integral? I tried to solve it with NDSolve, but failed: ...
2
votes
1answer
144 views

NDSolve doesn't work for this simple differential equations

I try to use NDSolve to do this partial differential equations, but the result is wrong... The source term is a Gaussian pulse as time and an exponential decay with the depth z. The result should be ...
3
votes
0answers
73 views

Unknown (internal?) function with `DSolve`

I am solving With Mathematica 10 the following ODE system: DSolve[{B'[x] == -f[x]*Cos[l]*G[x], G'[x] == +f[x]*Sin[l]*B[x]}, {B,G}, x] The solution is almost ...
0
votes
1answer
71 views

Solving differential equation with Variable constans?

How do I solve the following differential equations using Mathematica under the assumptions: If Abs[r[t]]<50 ->A=0.5;B=2; AND ...
6
votes
1answer
181 views

3D FEM with holes

I'm trying to create a finite element mesh with some spherical holes. To my mind the behavior is erratic but generally fails. I'm using MMA 10.0.2. In the following 3 different sets of holes are ...
-4
votes
1answer
57 views

How do I solve and graph this coupled PDE?

How can I solve and graph v1 versus t and v2 versus t for a given x? Let A = 3, p = 2, B = 4. At t = 0, v1 = 2, v2 = 2. For the graph the range of t is [0,60].
1
vote
1answer
62 views

Assymptotically Solving ODE with free parameters

I have a first order ODE, $F(y[x], y'[x], A, B) = 0$. I want to solve this numerically (with the boundary value $y[1] = i$ ) but also with the following requirements: A and B are free parameters which ...
0
votes
0answers
38 views

Extract x-values from InterpolatingFunction object? [duplicate]

Ok, So I have a numerical solution to a differential equation, and I am trying to get the data points out from it. So far, I have only been able to get the y-values with the following code: ...
1
vote
1answer
94 views

Generating a boundary mesh from a list of points

I have a list of points from which I am trying to generate a mesh: ...
35
votes
2answers
760 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
111 views

NDSolve with shooting method

Here are my equations: ...
15
votes
1answer
202 views

Eigenfunctions of the Laplacian on an arbitrary mesh

So, I've constructed a mesh over which I'd like to find eigenfunctions of Laplace's equation with a free boundary (a zero Neumann boundary condition along the edge). Mostly because I figured an ...
0
votes
2answers
62 views

Plotting direction fields along with trajectories

I am reading "Dynamics and Bifurcations" by Hale and Kocac, and in chapter one the following diagram is shown: Question is, how can I achieve the same plot using Mathematica? I've tried ...
6
votes
0answers
94 views

Using a Mathematica index as a DiscreteVariable in NDSolve when solving a coupled set of ordinary differential equations

Context Since the explanation below of the problem to be solved is lengthy, let me preamble this by saying that I have code that works to solve the problem, but I don't know whether (1) it's ...
1
vote
0answers
35 views

Using an arbitrary area bounded by lines for PDEs?

I have a set of lines I pulled from an image that make a closed loop, pretend it's a unit square for reference. Is there a way to use such an arbitrary region for solving PDEs, and is there a way to ...
0
votes
2answers
48 views

Plotting a Forced Vibration Differential Equation [closed]

I'm attempting to plot a differential equation solution but mathematica is giving me trouble. The plot is showing up blank. Here is what I have. ...
0
votes
0answers
37 views
4
votes
1answer
127 views

Solving a chemical system using NDSolve

I have to solve a set of coupled differential equations and am not sure how to proceed. It is a model of a chemical process where I'm interested to find the species concentration as $r$ varies. For a ...
1
vote
0answers
68 views

Solve PDE with DiracDelta function

This question is related to Solve wave equation using DSolve?. I think it is more appropriate to open another question on this topic. In the question, the compatibility conditions can be introduce ...
1
vote
0answers
93 views

How can I improve the solution of my PDE?

I want to improve the last code to find a better solution for umi. For now I'm using only MaxStepFraction. Also, when I put no ...