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

learn more… | top users | synonyms (3)

0
votes
0answers
66 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
61 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
104 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
146 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
133 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} ...
6
votes
1answer
212 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
91 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
97 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 ...
0
votes
0answers
37 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
4
votes
1answer
158 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
41 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 ...
14
votes
1answer
254 views
1
vote
0answers
50 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
173 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
56 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
852 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
316 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
40 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
524 views

Combining Gravity Turn and Orbit Models

I have a mathematical model for the motion of an orbiting spacecraft about Earth: ...
7
votes
1answer
272 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} ...
0
votes
0answers
53 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 ...
1
vote
0answers
69 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 ...
0
votes
1answer
64 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
73 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 ...
6
votes
0answers
102 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 ...
6
votes
1answer
202 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 ...
0
votes
1answer
172 views

A good choice to find solutions of ODE

In order to rephrase the question. I would ask you to take a look at the following problem: I have this system of ODE: $$ \begin{cases} \dot{x}(t)= x(t)[r_1(t) -b_1(t)x(t- \tau(t)) - c_1(t)y^m(t)] ...
0
votes
1answer
68 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 ...
7
votes
2answers
303 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
2answers
134 views

Strange Boundary NDSolve Problem

Mma10.1 doesn't work with the following boundary problem: ...
4
votes
2answers
1k views

How to plot and solve the numerical solution of a integro-differential equation

I have a integro-differential equation of the form $y'(t) = - \int_0^t {y(t_1 )} e^{t_1 - t} dt_1, {\rm{ t}} \in {\rm{[0,10], y(0) = 1}}$ My code is: ...
0
votes
2answers
111 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 ...
1
vote
1answer
64 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
1answer
147 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 ...
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, ...
3
votes
0answers
87 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
72 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 ...
1
vote
1answer
124 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: ...
1
vote
1answer
64 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 ...
-4
votes
1answer
59 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].
0
votes
2answers
228 views

Interpolating a ParametricFunction

Original domain of my independent variable t is 0 to 10 nanometers, but in Mathematica (as in most numerical software), it's good idea to solve differential ...
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: ...
0
votes
1answer
119 views
15
votes
1answer
218 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 ...