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

learn more… | top users | synonyms

4
votes
1answer
99 views

How to use WhenEvent with a vector ODE in NDSolve

I have an ODE system I'd like to specify as a vector equation in NDSolve. I'm not clear on how to use WhenEvent for a system ...
1
vote
1answer
99 views
1
vote
1answer
148 views

Writing NDSolve-like functions

I've been using Mathematica for a while now, and there are multiple common tasks that I end up doing. I'd like to learn how to convert them into functions so that I can store them in some file and ...
2
votes
0answers
92 views

How to solve system of differential equations of arbitrary order (symbolic tensors)?

I am interested in solving systems of ODEs symbolicly, keeping things with arbitrary dimensions for clarity. For example, assume that $x, f(x) \in R^N$ and $A \in R^{N \times N}$, how do I solve ...
7
votes
1answer
410 views

Issue with the NDSolve code

With this procedure, one may determine an eigen-value function $R(a)$ for any given $\Xi$ (say 0, 25, 50, 75, 100) ...
4
votes
2answers
113 views

Non-convergance of the solution of the 1+1 partial differential equation

I am stacked with a partial differential equation as follows: This is the $\LaTeX$ expression for the equation $$ \frac{\partial y}{\partial t}=\frac{\partial^2 y(x,t)}{\partial x^2} ...
0
votes
1answer
358 views

DSolve to solve a system of differential equations [duplicate]

I need to solve a system of differential equations as follows: ...
8
votes
2answers
274 views

How to draw the image of a circle under the action of a transformation of the phase flow?

How to draw the image of a circle $x^2+(y-1)^2<1/4$ under the action of a transformation of the phase flow for the equation $\dot{x}=y,\ \dot{y}=-\sin x$? Here $\dot{x}$ means $dx/dt$. Any help or ...
4
votes
0answers
201 views

Using FindFit to fit nonlinear ODE parameters, subject to a constraint (an inverse problem) [duplicate]

Similar to this post I am finding that constraints tend to make FindFit poor at finding a good fit. However, unlike the previous post, the constraints are required ...
0
votes
3answers
266 views

Differential equation of mass spring system with compliant stoppers

I would like to solve numerically the differential equation for the displacement x[t] of a mass m-spring ...
2
votes
1answer
76 views

Export to CDF fails

The code below generates the error when I attempt to export to CDF Preview: Coordinate {xde[4.69588928222656], yde[4.69588928222656]} should be a pair of numbers, or a Scaled or Offset form. ...
12
votes
1answer
545 views

Solve a PDE on a domain $\Omega$ with given boundary conditions

I'm starting to study the behavior of some PDEs and I would like to run simulations in mathematica to help me visualize solutions. For example, a prime example that I would like to study is $$ ...
0
votes
1answer
116 views

Manipulating and using result of DSolve

I have an unsightly looking equation that nonetheless has an analytical solution. The solution is ugly as hell, but exists; I use the following code with the DSolve ...
1
vote
1answer
127 views

DSolve expression not evaluating

I entered the following into Mathematica: p[x_] := 4 x q[x_] := 4 Sqrt[x] - 3 f[x_] := E^-Sqrt[x] DSolve[y''[x] + p[x] y'[x] + q[x] y[x] == f[x], y[x], x] ...
2
votes
1answer
433 views

Differential equations: Solving a singular/nonlinear ODE using NDSolve

I am trying to numerically solve a rather horrible looking singular/nonlinear ode: A*(y''[x]/y[x])'' +y[x]^2==1 on the interval ...
1
vote
1answer
512 views

Singularity / stiffness / precision errors with NDSolve

I have a relatively simple 2nd Order ODE problem I'm trying to solve numerically $p'' + \frac{1}{r}p' = A(\frac{p(r)}{p(r) + k_{m}})$ where $A = 7.5795*10^9$ and $k_{m} = 1$. So trying to get ...
3
votes
1answer
367 views

Numerical solution of Bessel-like equation using NDSolve

I need to calculate solution of Bessel-like equation having general form: $\frac{d^2F}{dr^2}+\frac{1}{r}\frac{dF}{dr}+Q(r)F(r)=0$. Problems come from the points near $r=0$ leading to numeric errors. ...
0
votes
0answers
77 views

DSolve is rejecting my description of a system of PDEs

I am trying to solve a system of partial differential equations using DSlove. But i get the input equations in return. Dsolve is not doing anything ...
0
votes
1answer
147 views

PDE Solving in mathematica

I'd like to ask how I might go about solving this equation: $\frac{\partial Ci}{\partial t} + \frac{1}{r^2}\frac{\partial (r^2 Ci)}{\partial r} = D\frac{1}{r^2}\frac{\partial}{\partial ...
0
votes
0answers
96 views

Defining a curved region for NDSolve

I have an equation to solve using NDSolve which involves two parameters: $en$ and $k$. The equation produces a set of curves when $en$ is plotted against $k$. In ...
1
vote
0answers
133 views

parameter NDSolve

the question I need to solve is: t x'[t] == -x[t] + y[t], t y'[t] == -5 t^2/x[t]^2 + x[t] - y[t], x[1] == 4, x[b] == 1 in order to solve the coupled ...
0
votes
1answer
221 views

How to change machineprecision digits

I am trying to compute t0: ...
2
votes
1answer
232 views

How to work with differentials explicitly?

When working with differential equations with independent (e.g. t )and dependent (e.g., x[t]) variables Mathematica expresses ...
1
vote
1answer
878 views

Can Mathematica solve integro-differential equations?

I have integro-differential equations like this: ...
1
vote
1answer
182 views

Using ParametricNDSolveValue with initial conditions of another ParametricNDSolveValue

I have a system of parameter-dependent ODEs, which I can solve using ParametricNDSolveValue. Now, I have another ODE, which has as initial condition the solution of ...
0
votes
0answers
332 views

Solving differential equations with sums (power series)

I have sets of 10 differential equations, but for this purpose I'll demonstrate what I need on one example that can be solved by hand. My equation is this: ...
8
votes
3answers
647 views

Can Mathematica solve this sort of functional/differential equation?

I am looking for differentiable functions $f$ from the unit interval to itself that satisfy the following equation $\forall\:p \in \left( 0,1 \right)$: $$1-p-f(f(p))-f(p)f'(f(p))=0$$ Is there a way ...
0
votes
0answers
577 views

PDE problem with initial and boundary conditions

I'm new to mathematica and I don't know what I do wrong, I have written the following PDE problem, with both initial and boundary (four in total) ...
12
votes
1answer
823 views

Numerical solution of coupled ODEs with boundary conditions

I have to solve the following set of ODEs and just can't get good results using Mathematica $$ r\frac{d}{dr}\left(\frac{1}{r}\frac{d}{dr}A(r)\right)-\xi^2F(r)^2\left(A(r)-1\right)=0 $$ $$ ...
1
vote
1answer
244 views

Solve a total derivative - independent vs. dependent variables

I am trying to force mathematica to solve a generally defined function for d lp: In a reduced version, w depends on l2, ...
0
votes
2answers
999 views

Solving a system of nonlinear coupled ODEs

I tried using NDSolve to solve the following system of equations: ...
1
vote
0answers
142 views

NDSolve error when solving pde

I am trying to calculate speed of viscous fluid in a rotating hollow sphere. The sphere is rotating round z axis. The fluid is incompressible. I used Navier-Stockes equations. The only boundry ...
1
vote
0answers
175 views

Jumps in NDSolve results

I need to compute using NDSolve routine, some function $F(x)$, having two possible values $F_1(x)$ and $F_2(x)$ depending on whether the argument exceeds some ...
0
votes
0answers
90 views

Nested NDSolves with functions

I am trying to solve a system of nested differential equations, and have attached my code below. The first section is some variable declarations, then I solve my first diffeq and store the solution to ...
0
votes
1answer
69 views

LMS distance from a point to an InterpolatingFunction

I have a short script to NDSolve a second-order nonlinear BVP, which as its output produces an InterpolatingFunction object. I ...
6
votes
1answer
425 views

Getting clearer StreamPlot output

When I do a StreamPlotof a rather complicated pair of differential equations, it loses some details. For example: ...
11
votes
1answer
585 views

Solving Killing equations

Is it possible to solve Killing equations in Mathematica for a general vector? I am looking for a way to create Killing equations and then find what the vectors are, but I have a problem with this. ...
3
votes
3answers
383 views

StreamPlot using NDSolve gives error messages

StreamPlot[{x[0], x'[0]} /. NDSolve[{x''[t] == 1, x'[0] == v0, x[0] == x0}, {x, x'}, {t, 0, 1}], {x0, -2, 2}, {v0, -2, 2}] The above code gives me the errors ...
0
votes
1answer
143 views

Checking differential equation solution

I have this differential equation: eq=D[ψ[r],r]+A*ψ[r]-(B/(A*r))ψ[r]==0; And DSolve sucessfully solves it: ...
2
votes
1answer
318 views

Avoiding zero (empty set) solution with NDSolve

I'm trying to use NDSolve for a chemical kinetics equation where the rate of conversion is given by this relationship as typed in Mathematica: ...
2
votes
0answers
387 views

Solving a diffusion equation

I need to solve a particular diffusion equation with NO boundaries http://astronomy.nju.edu.cn/~chenpf/c/courses/fluid/pringle81.pdf equation (2.10) with nu = cost. ...
5
votes
0answers
244 views

NDSolve and memory usage

After some googling, i've found similar problems around, but didn't find a 100% satisfactory answer, so let me ask here: I'd like to solve a 1+1 problem using the method of lines. In spherical ...
4
votes
3answers
322 views

Plotting the direction field of a differential equation

I have to sketch the direction field for the following differential equation: $$\frac{dy}{dx}=\frac{-0.02 y +0.00002 xy}{0.08 x-0.001xy}$$ This is the code I used, which gives an incorrect plot: ...
1
vote
2answers
126 views

NDSolve error---equations expected [closed]

I keep getting an error trying to used NDSolve for three coupled equations. It works in another programming language, but I am having trouble apparently writing it ...
2
votes
0answers
202 views

NDSolve Issue with initial conditions

I am trying to implement a Poincare section for a gravitational movement on the plane $(x,y)$. Here is the code I wrote ...
2
votes
1answer
535 views

Nonlinear least squares

I have a typical nonlinear least square problem and it seems very similar to the example provided in the section on parameter fitting at the Wolfram website. Unfortunately I always get some error ...
3
votes
2answers
494 views

FindFit for a differential equation model with multiple variables?

I'm trying to figure out how to use FindFit with a multivariable differential equation model and data. I've successfully made it work for the one-variable version ...
2
votes
1answer
162 views

NDSolve much slower when using InterpolatingFunctions inside

I am solving an ODE system with Mathematica. Let's say the system is of the form (to simplify). ...
3
votes
2answers
193 views

DSolve vs a system of differential equations

I'm trying to solve a simple system of differential equations. ...
0
votes
0answers
113 views

Solve differential equation with undetermined constants making the assumption that the constants are positive

I want to solve: eqn = D[f[w], {w,2}] + (3/2 c^2 k Exp[c w] - 9/4 c^2 k^2 Exp[2 c w]) f[w] + m^2 f[w] sol = DSolve[eqn == 0, f[w], w] with the assumption ...