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

learn more… | top users | synonyms

1
vote
1answer
101 views

Solution of Coupled Second Order ODEs with Boundary Conditions

D[Tu1[x], {x, 2}] qu - Tu1[x] (fu0 + I w p) == Tou[x] f1 D[T1[x], {x, 2}] q - T1[x] (f0 - b g0 + I w p)== To[x] (f1 - b g1) - g1 For T1 , ...
0
votes
0answers
60 views

Solving systems of equations and derivatives

I am new to Mathematica, and I'm not sure how to solve a system of equations that include differentiation. Given that f and g are differentiable functions: ...
3
votes
1answer
283 views

Solving a differential equation with initial conditions

I want to get a solution to an ordinary differential equation with imposed initial conditions. I'm confused about why my following code doesn't work: ...
1
vote
1answer
145 views

Non-numerical value for a derivative on NDSolve function

I am trying to solve the following system of differential equations: ...
10
votes
3answers
2k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t) $$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so ...
0
votes
1answer
105 views

DSolve does not give solution

No answer is given when I evaluate the following expression: ...
5
votes
1answer
190 views

VariationalD giving the wrong solution?

EDIT: As pointed out in the comments, VariationalD gives a variational derivative (which I don't want), not a derivative with respect to a function (i.e. ...
1
vote
1answer
113 views

Solution of an ODE in implicit form

For some non-linear ODEs there is only implicit form of solution using DSolve. For example DSolve[(y[x] + x - 1)*y'[x] - y[x] + 2 x + 3 == 0, y[x], x] gives ...
1
vote
0answers
113 views

Runge-Kutta-2 on System

After spending some time using the Mathematica documentation and this Mathematica.SE answer, I implemented the Runge-Kutta-2 routines. I am hoping someone can validate what I did and tell me that it ...
3
votes
1answer
107 views

Polar Differential Equation

I have a polar differential equation (this is the reduced variant) as: $$r' = 0, \theta' = 1$$ I figured out (from previous answers) that I can nicely convert this to Cartesian and use StreamPlot ...
0
votes
1answer
82 views

Plotting the discrete solution to a PDE

So I went through all the grunt work of solving a PDE in discrete form for a research project. Now I have a Temperature solution as a function of time and space: $$ T_{i}^{n+1}=\left( \dfrac ...
1
vote
1answer
63 views

Variable location for intial value in ParametericNDSolve

I am trying to figure out if Mathematica allows a variable location for a known initial value for ParametricNDSolve. I haven't been able to find an example where ...
2
votes
0answers
62 views
0
votes
0answers
45 views

fitting system of ODEs - “part2 of {} does not exist” errod

I'm trying to fit my data to a system of ODEs: x'[t]==a*x[t]+b*y[t] y'[t]==c*y[t]+d*x[t]+e*z[t] z'[t]==f*z[t]+g*y[t] having t,x[t],y[t],z[t]. I followed the code ...
0
votes
1answer
68 views
1
vote
0answers
92 views

BVP system of nonlinear coupled ODEs

Here I am, trying to solve this system of coupled ODEs (up to a minus sign): $ u''=6u^5-(8+4a)u^3+(2+4a)u+\frac{2u((w^2-s)^2+bw)}{(u^2+c)^2}$ $ w''=\frac{4w^3-4bw+b}{u^2+c}$ with the boundary ...
1
vote
1answer
67 views

Discrete sampling of interpolating function returned by NDSolve

When solving an ODE with NDSolve, Mathematica returns an interpolation function. I need a discrete sampling of this function however. Naively, I can write this as (example): ...
0
votes
1answer
94 views

Replacement rules in combination with pure functions to make a change of variables

I have defined my function in this way w = f[r,Θ] ; After some calculations i obtained my results with respect to the previous function. For instance: ...
0
votes
1answer
100 views

Setting plot size within vector; dynamic slider (two part question)

I have a question about the size of a plot in mathematica. I'm working on some differential equations (a simplified model of heat transfer in a building). I've programmed it so that you can set ...
1
vote
1answer
182 views
0
votes
1answer
222 views

Heat Transfer equation by numerical methods

I want to solve the following heat conduction equation using numerical methods: D[u[x, t], t] -alpha*D[u[x, t], {x, 2}] == 0 u[x, 0] == 1/(1 + x^2)^0.25, u[-10, t] == u[10, t] == 0, ...
2
votes
1answer
156 views

Trying to solve a differential equation with a piecewise initial condition

I am trying to solve $$u_t=\frac{1}{4}u_{xx}$$ $-\infty<x<\infty,\: t>0$ With the initial condition $u(x,0)=\phi(x)$ where $$ \phi(x)= \left\{ \begin{array}{lr} 1 & ...
1
vote
0answers
34 views

How to find discretezation error of NDSolve

Is there a way to find out how large the truncation, round-off, and other errors that occur from discretizing a differential equation are while using the default settings in NDSolve? Or would I have ...
1
vote
0answers
78 views

ExpToTrig transforms solution to 4th order ODE into unwanted form

Mathematica gives the solution of the second order differential equation DSolve[a y''[x] + b*y[x] == 0, y[x], x] in trigonometric form ...
-2
votes
2answers
167 views

How do we solve third order nonlinear differential equation f’’’+ff’-f’2-Re2 f’=0

How do we solve third order nonlinear differential equation f’’’+ff’-f’2-Re2 f’=0 f(0)=0,f'(0)=1,f(Infinity)=0 From the OP's comment: ...
14
votes
2answers
1k views

How to fit 3 data sets to a model of 4 differential equations?

I'm a biologist and a newbie in Mathematica. I want to fit three data sets to a model consisting of four differential equations and 10 parameters. I want to find the parameters best fitting to my ...
0
votes
0answers
57 views

Simplify DSolve solutions (all roots are known)

I have problem how to present the solution of the system of two differential equations in the form as in the case of one differential equation if I know the nature of roots. For example ...
0
votes
1answer
100 views

NDSolve in exact points - nonlinear equation (Degrees and Radians confusion)

I found solutions of two nonlinear equations, but I have three small questions. First I am in confusion because of initial value. The system is mechanical and unknown ϕ is an angle, which I set to ...
1
vote
1answer
103 views

Numerically solving an ODE for a parameter

My equation is as follows: sol = ParametricNDSolve[{(f'[r]^2 - 1) f'[r] r == 6.2 (f'[1])^2/1000, f[1] == a}, {f}, {r, 1, 3}, {a}] where the function ...
2
votes
2answers
121 views

WhenEvent for several variables

I want to solve a system of nonlinear two differential equations (say, in $\theta(x,t)$ and $\phi(x,t)$ with NDSolve, but I want to stop the evaluation when one of ...
4
votes
2answers
218 views

How to transform transfer functions into differential equations?

is there a way with Mathematica to transform transferfunctions (Laplace) into differential equations? Let's say I have the transfer function $\frac{Y(s)}{U(s)}=\text{Kp} \left(\frac{1}{s ...
0
votes
0answers
89 views

Boundary Value Problem- using NDSolve or another method

I am trying to solve a set of coupled partial differential equations, with defined boundary conditions using mathematica. Here are the equations and the boundary conditions. ...
0
votes
0answers
50 views

Shooting method problem

I am trying to solve the BVP problem: $ u''-u'=-6u^5+(8+4a)u^3-(2+4a)u, u(0.001)=1, u(10)=-1, u'(0.001)=-0.001$ ...
0
votes
1answer
157 views

Using NDSolve for three variables as function of time

I want to be able to plot z, and r. Should I be using DSolve, NDSolve or something else? I've tried to clear it up a bit Thanks, Will ...
0
votes
1answer
86 views

NDSolve Initial Condition Returned as True [closed]

I am attempting to use an NDSolve solution as an initial condition for another NDSolve as suggested in this post: Using NDSolve solution as initial condition for another NDSolve ; however, Mathematica ...
0
votes
1answer
202 views

NDSolve example - analytical vs numerical solution. How to specify initial conditions?

So, I have the following equation: y[t]^-3 == w^2 y[t]/t^2 + y''[t] where w^2 = (t0 k0)^2. Analytic solution is easy to ...
1
vote
2answers
106 views

NDsolve with variable end-point

I want to plot the solution a coupled ODEs as a function of the end point only. Mathematica code: ...
1
vote
1answer
47 views

Invariant error plot for an arbitray system of ODE

i try to use InvariantErrorPlot command for a generic system of ODE but i find only example with pre-building equations from Mathematica Packages. This is one of ...
2
votes
0answers
71 views

Are there some other ways to solve a second PDE except DSolve?

I have a partial differential equation as follows: $$\frac{\partial p(x,t)}{\partial t}=\text{Dp} \frac{\partial ^2p(x,t)}{\partial x^2}-\frac{p(x,t)-\text{p0}}{\tau }$$ What I try to do was to get ...
0
votes
0answers
99 views
2
votes
1answer
79 views

The output is the same as Input when I add the boundary conditions to a PDE

I am trying to solve a PDE in the first order with specific boundary conditions. When I solve use DSolve without the boundary conditions, Mathematica gives me an answer in an arbitrary function. When ...
0
votes
1answer
115 views

Initial and boundary value errors

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> I keep getting this, ...
2
votes
2answers
420 views

How to visualize slope fields of differential equations without vectors?

I'm looking to visualize slope fields of differential equations for my differential equations course. Every example I see draws them as vectors, adding unnecessary "arrows" that, to me, are visually ...
0
votes
0answers
169 views

NDSolve::ndsz:At t==0.000039576, step size is effectively zero

I adjusted my code accordinly to the advice I got. However I still have a problem with this code which now looks like this: ...
0
votes
2answers
257 views

Problems with NDSolve and stiffness

I am trying to solve an ODE in chemical kinetics: $$\begin{align*} \frac{\mathrm d[x]}{\mathrm dt} &= -k_1 [x][y]\\ \frac{\mathrm d[y]}{\mathrm dt} &= k_1 [x][y] - k_3[y] \end{align*}$$ My ...
10
votes
3answers
699 views

Plot Matlab icon

I started to explore this on a whim and hasn't succeeded yet… Some introduction for the icon is found here but I can't understand it very well. (I admit that, though playing with ...
0
votes
0answers
133 views

How to obtain differential equations of motion using Lagrangian dynamics?

I'm confused to find a set of differential equations of motion of a pair of masses, m1 and m2 joined by a spring of constant ...
0
votes
1answer
34 views

How do I pull from a data list for parameter values in a system of ODEs and then solve and plot?

I have a parameter set list and I would like to solve a system of ODEs multiple times using each parameter set in the list. Then I would like each set of solutions to be graphed on the same plot. ...
0
votes
0answers
96 views

Boundary Condition Problem with Green's Function

My temperature distribution looks like: Mean wire temperature is : To[x_] := 2 c1 Cosh[x a1] + a2 And it is continuous at two points. In positive part: ...