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

learn more… | top users | synonyms (3)

0
votes
0answers
27 views

Working with vector-valued functions to solve an ODE

Let's say I have a simple vector-valued ODE given by $y'(t) = K*y(t)$ where K is a matrix $K_{n_{X}n}$. Let's assume that the matrix is $K_{21_{X}21}$, $K = \left[\begin{array}{cccc} k_{1_{X}1} ...
0
votes
1answer
79 views

How to plot trajectory for a differential equation in polar coordinates? [duplicate]

I have a differential equation for dr/dt and d[Theta]/dt in terms of r and theta, and I am trying to plot the trajectory in the x-y plane for a given initial condition (r,theta). ...
5
votes
0answers
114 views

NDSolve computes wrong solution?

Please excuse me if the question has already been answered somewhere else, but I was not able to find it. Could somebody tell me what I am doing wrong here? The solution of DSolve is of course correct ...
0
votes
1answer
66 views

Orthogonal Collocation Using Jacobi Polynomials

I'm trying to solve a PDE(diffusion-reaction in a spherical catalyst pellet) using Jacobi Orthogonal Collocation method. But at the stage of solving the system of ODEs(using ...
0
votes
0answers
78 views

Plotting a function against some other function?

I want to plot a function against two other functions which are actually determined by ndsolve in my mathematica code. ...
0
votes
0answers
59 views

BVP Non Linear Shooting Method Implementation

I've been working on this problem for several days. I want to split a 2nd order ode bvp into two auxillary ivps and use those to approximate the solution to the bvp. I have managed to get one ...
3
votes
2answers
96 views
0
votes
0answers
53 views

How to solve using NDSolve

(d^2 f)/(dρ^2 ) + 2/ρ df/dρ = 9 ϕ^2 (f/(1+βf)) Boundary conditions df/dρ=0 at ρ=0 f=1 at ρ=1 We have to make plot of η vs β using following equation with above ...
0
votes
0answers
121 views

Heat Equation with Neumann Boundary Conditions and Lateral Heat Loss

I am trying to solve the following heat equation with Neumann BC's: $\quad \quad u_t$=$\alpha ^2$$u_{xx}$-$\beta$ (u-$T_0$) $\quad \quad u(x,0)=f(x)$ $\quad \quad u(0,t)_x=0$ $\quad \quad ...
5
votes
2answers
120 views

Trouble with ParametricNDSolveValue

I have this: ...
6
votes
2answers
264 views

Using NDSolve to produce 10,000 points of a solution

I am beginning to read the Differential Equations Laboratory Workbook by Borelli and the preface begins with an image. I understand how to use NDSolveValue (at a ...
0
votes
1answer
37 views

Replacing y[x] with myPowerSeries

Consider: myPowerSeries = Series[y[x], {x, 0, 3}] Which produces this output. ...
0
votes
0answers
77 views

Using Mathematica to solve a recursive system of differential equations

I believe I have a difficult problem to work on specially because I don't have any previously experience using Mathematica in this kind of situation. So I'll try to describe it as best as I can hoping ...
0
votes
0answers
26 views

Coupled Mass Transport in two media using NDSolve

I'm trying to model simple 1-D diffusion in two media with different diffusivities. It's a transient problem so I have a PDE. I have concentration everywhere = 0 at time t=0, and suddenly at t>0, I ...
0
votes
1answer
50 views

Having trouble interpreting the results DSolve gives for the Laguerre equation

I am trying to solve a second order ODE using Mathematica. Before I get into solving my (more complicated) problem, I am trying to use DSolve on known ODEs to check that the answer that Mathematica ...
0
votes
0answers
38 views

How to use a While loop with NDSolve?

So basically I have this coupled ODE system I'm trying to solve numerically: ...
1
vote
0answers
31 views

NDSolve with external function

I have a complicated function g[a_,s_,t_] where s_and t_ are constants added by hand for ...
1
vote
2answers
226 views

How to Fit experimental data with 4D ParametricNDSolve?

Let me first explain the background problem. I'm trying to solve a problem with a projectile motion in 4D such that the position vector is: $\boldsymbol{r}(t)=\boldsymbol{r}[x(t),y(t),z(t)]$ I have ...
1
vote
1answer
152 views

Solution of a system of differential equations with a correction factor varying over time

Dear Mathematica users, I am trying to solve a system of equations of first order and time depedent. The system has 5 equations, one for every variable which varies over time. At the moment I am ...
0
votes
1answer
51 views

simple dynamical system with disturbance

I am new here and trying to simulate a very simple dynamical system with periodic force or Dirac function: $$mx'' + bx' + kx = u(t)$$ I want to draw the displacement(position) and velocity of the ...
0
votes
1answer
74 views

Why does DSolve not give the expected analytical solution for a system of DAE? [closed]

I made a mistake in typo I am trying to solve the following system of DAE: X'[t] - y*Y[t] + x*X[t] == 0 Z'[t] - y*Y[t] + x*Z[t] == 0 X[t] + Y[t] + Z[t] == 1 with ...
2
votes
0answers
123 views

Problem solving a nonlinear partial differential diffusion equation [closed]

EDIT: actualy the nonlinear partial differential equations for interacting density distributions, including boundary conditions, should be given as $$ \frac{\partial\phi}{\partial t} = D ...
0
votes
1answer
93 views

How to compute DSolve or NDSolve for kind of piece wise function?

I need to Compute the expression for two functions. q[t] and q1[t] over certain range of time. The code is given below. ...
0
votes
1answer
64 views

Solving a system of ode and plotting the nullclines

I have the following problem to solve it is a system of two ode's. I'm given that q=2/Sqrt[1 + 1600 y] and then the ode's are as follows. ...
1
vote
2answers
105 views

Minimize the sum-of-squares errors for a system of ODEs

I'm trying to minimizing the sum of squared errors on a 2-equation system of ODEs and empirical data. I keep getting an error and I think the root of the problem is my invocation of ...
0
votes
0answers
63 views

System of non linear differential equations with two unknowns

I am new to Mathematica and am trying to solve a system of 3 (non-linear) equations with two variables $x,\ y$ and one unknown function $f(x,y)$ of these two variables. The third equation defines the ...
1
vote
1answer
132 views

Why DSolve[] does not work?

I try to find the analytical solution to the ordinary differential equations as fellow: $$\frac{d^2 \theta}{d t^2} = \dfrac{-M\cos\theta\sin\theta(\frac{d\theta}{dt})^2 - ...
0
votes
1answer
61 views

Problem in computing Dsolve

I want to compute my result using Dsolve. The code is given below. ...
0
votes
0answers
158 views

fourier frequency analysis for NDSolve of complex variable

i have a set of coupled equations for complex amplitudes c1 and c2, for which i'd like to find frequency and phases (and phase shift); i looked up for some nswers on the forum, but can't seem to find ...
1
vote
0answers
104 views

Black Scholes PDE solved by method of lines

I've been trying to solve the Black Scholes partial differential equation (BSPDE) by transforming it to the heat equation (HE) form and using method of lines (discretizing spatial argument and leaving ...
1
vote
2answers
105 views

differential equation of order2

I want to solve the following differential equation ode = x*y''[x] + y'[x] + 4*x^2*(x^2 - 1) y[x] == 0 But do not know how to actually solve it. Any suggestion?
1
vote
1answer
97 views

Solve system of equations with implicit function [closed]

I am trying to solve a system of 3 (non-linear) equations with two variables $x,\ y$ and one unknown function $f(x,y)$ of these two variables. Also, the system includes the change of this function $f$ ...
15
votes
1answer
828 views

Solving and Animating Three Body Problem

I am attempting to solve a three-body problem using the Lagrange formalism, with a 1/r potential. I started off by defining T and U (kinetic and potential energy) as follows: ...
0
votes
1answer
53 views

Solve system of differential equations and show the chaotic behavior of the solutions [closed]

I want to solve a system of differential equations and show the chaotic behavior of the solutions. Here x[t], y[t] and ...
0
votes
1answer
154 views

Solving differential equation with initial conditions

I want to solve the following differential equation with initial conditions: ...
-1
votes
1answer
97 views

Laplace equation

I tried to run this code, but it doesn't work for NDSolve ...
1
vote
2answers
198 views

How to solve for “k”

So the question is given that the atmospheric pressure is modelled by the differential equation p'[h]=-kp[h], p[0]=1013, p[20]=50. find k and comstant of integration. My code was: ...
0
votes
0answers
26 views

ImplicitRegion Error in NDSolve?

I'd like to solve a differential equation with some initial conditions to get an eclipse curve for Earth's orbit using Newton's Law in a cylindrical coordinate. NDSolve gave me two more useless ...
0
votes
2answers
34 views

solving ode and plotting solution vs time

I'm currently trying to solve this system of two ode's and can't seem to be able to solve them. I am new to coding, so I don't know where I could have done a mistake. I'm attaching the code which I ...
0
votes
1answer
83 views

My simulation is not never finishing and it is taking so much time?

I am running simple code which involves calculation of two first order differential equations.It is taking so much time and i am unable to get the results as the simulation is never finishing. ...
7
votes
1answer
139 views

Difficulty in getting correct Gaussian curve for diffusion of point source

I want to solve diffusion of a point source numerically and check it against analytical solution. first I define initial profile, ...
0
votes
0answers
24 views

How to solve coupled first-order ODE with vectors?

m * v'[t] = q * (E + v x B) using the following: B = (0,0,B0), E=(Eperp,0,Ez). How would I find the general solution of ...
0
votes
1answer
55 views

DSolve not outputting any result

I'm trying to solve a system of differential equations using DSolve, but I am not getting any output beyond a repetition of my input: ...
-1
votes
2answers
92 views

How to make sure input is an ODE

I'm having trouble wrapping my head around why this isn't an ordinary differential equation. ...
0
votes
1answer
165 views

How To Use D[ ] to Define a System of PDEs

We have two variables $u_{1}$ and $u_{2}$ which are functions of $x,t$. That is, $u_{1}=u_{1}(x,t)$ and $u_{2}=u_{2}(x,t)$. Consider the the system of partial differential equations $$\frac{\partial ...
2
votes
1answer
508 views

Animated Wave propagation using split operator method

Here is the state of the art: By solving the time-dependent Schrödinger equation, one obtains that the propagated wave function after time step $\Delta t$ can be calculated by applying the ...
5
votes
1answer
172 views

How to plot the solution of a Partial Differential Equation?

My attempt. I need to solve numerically the Complex Ginzburg-Laudau Equation (CGLE): $$ \frac{\partial A}{\partial t}=\epsilon A-(1+i\beta)|A|^2A+(1+i\alpha)\nabla^2A $$ I'm using a uniform initial ...
0
votes
1answer
69 views

How to properly use conditionals inside NDSolve

Currently I am working with Mathematica to learn the program, and I'm confused what exactly is wrong with this code. ...
1
vote
1answer
78 views

Constants from differential equations

I have a problem, I've solved 2 diff equations and I have: ...
2
votes
3answers
129 views

DSolve with assumptions

I'm new to mathematica and was wondering if someone could help me. I have a differential equation which is: $\frac{dy}{dx} = 1/2 y(1 - y)(a - y + a y)$ It has initial condition $y(0) = y0$ and ...