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

learn more… | top users | synonyms

0
votes
0answers
25 views

Energy Equation: Boundary and initial condition

I'm trying to solve the energy equation and NDSolve is able to solve the problem. Even though the result is acceptable, I have always the warning "boundary and initial conditions are inconsistent". ...
0
votes
0answers
39 views

Mathematica can't solve it - Plot contours by iteration?

Suppose I have some equation that is tedious or even impossible to obtain an expression analytically, and I want to plot contours of it using iterative methods. Suppose the equation is something ...
2
votes
2answers
50 views

Simple differential equation to solve

Suppose we have this differential equation: $$ x^2 + y^2 + z^2 = \frac{\frac{\partial y}{\partial x}}{x+y+z}$$ I want to find $\frac{\partial y}{\partial x}$ at x=1,y=1,z=1. I tried this code but ...
0
votes
2answers
48 views

Solve differential equation with 3 variables and plotting contour

Suppose we have this equation: $$ 2 - x g(z) f \left(x, \frac{\partial y}{\partial x}\right) = 3y $$ using initial condition $y = 2$ where $g = \left| \frac{3}{2-iz} \right|$ and $f = ...
0
votes
0answers
23 views

Ndsolve, transmission line transients

I am trying to use NDSolve to analyze transients in transmission lines. I started with this simple one: ...
0
votes
2answers
51 views

Plot integration curve of a system of ODEs

I'm really n00b in Mathematica, so please bear with me, as this seems to be my only option to learn how to do what I wany to do. I have a system of two differential equations: ...
2
votes
4answers
175 views

Implicitly differentiate an equation, then solve the resulting equation

Suppose I have an extremely tedious equation to differentiate and want mathematica to help do the differentiation and solve. Consider a less tedious equation: $$y (x,z) = sin \left(\frac{1}{x} ...
0
votes
0answers
21 views

Pass model parameters to NDSolve'Reinitialize

I am wondering if there is a way to pass parameter values during the NDSolve'Reinitialize step of the NDSolve process? I've read that one way to possibly speed up repeated calls to NDSolve is to ...
0
votes
1answer
117 views

Numerical solution of the hyperbolic equation

I am trying to solve the following hyperbolic equation with given boundary conditions: I choose as initial condition $u=1$, and evolve the above hyperbolic equation until reaching a stationary ...
4
votes
1answer
134 views

Using NDSolve to solve Equation of Motion in cylindrical coordinates

I have a set of coupled differential equations which represents the equation of motion of a particle in cylindrical coordinates with the following Hamiltonian: $$ H=\frac{1}{2m} \left( p_r^2 + ...
0
votes
1answer
62 views

Unexpected behaviour plotting a PDE solution

I'm solving some coupled PDEs (Eb1 and Ef1) and what I plot for Eb1 appears to be correct. However, for some reason, when I go to plot Ef1, I get nothing. MWE is below (beginning is constants and ...
0
votes
0answers
96 views

Im trying to model balls in a box with NDsolve, but the balls keep escaping the box

This Code produces a box filled with balls at different positions with random charges on them and then calculates their motion according to Coulombs law. rendering the electric field as well as the ...
1
vote
0answers
28 views

Compiled NormFunction

I would like to use a user-defined NormFunction with NDSolve, e.g., NormFunction -> (Norm[Take[#, 2], \[Infinity]] &) which says that the infinity norm ...
0
votes
0answers
35 views

Coupled ODEs with boundary conditions - DSolve Error

I'm relatively new to mathematica and I can't find the error here. I suspect it has something to do with the fact that vx, vy, vz aren't blue on my mathematica - as in, they already have some assigned ...
0
votes
0answers
64 views

Getting error while solving a nonlinear differential equation [closed]

I have a non-linear differential equation for a system which is y''[t] - y'[t]/t - y[t]^3 + y[t]/t^2 + y[t] == 0 I have the following conditions on the system ...
1
vote
1answer
97 views

Liouville theorem demonstration

My goal is to create a demonstration of the Liouville theorem in 2D phase space. I made up an interesting potential energy function $U(x) = (x-4)x^3 + 27$, so that the minimal energy of system is ...
1
vote
2answers
107 views

Trying to model Heat flow trough different materials with NDsolve

What I'm trying to achieve is model of the heat flow, in this case for the simplest 1D case,its relatively easy to do for the steady state case, but when I try to do it with NDsolve so I get the ...
1
vote
1answer
87 views

Finding the eigenfunctions of one and two dimensional Harmonic Oscillator

(Edited) For finding the ground state wave function of: $ H\psi(x) = (-1/2)d^2\psi(x)/dx^2 + (1/2)x^2\psi(x) = E \psi(x)$ I have written: ...
0
votes
0answers
72 views

Problem With NDsolve trying to simulate n-body-gravity problem

Im Trying to model a cloud of point masses that act according to gravity, what im strugeling with is the exclusion of cases where euclidian distance = 0, If I try to do it with an If statement in my ...
1
vote
0answers
96 views

How to find a particular solution using NDSolve

I'm looking for a way to find a specific solution to a differential equation. As a simplified version of my problem, here's a similar setup for a simple harmonic oscillator problem. ...
0
votes
0answers
55 views

Showing Steps of Calculations [duplicate]

I'm solving a a differential equation in Mathematica and was wondering how to show the steps, like how Wolfram|Alpha does it, in the program. Any ideas?
0
votes
0answers
70 views
1
vote
2answers
86 views

Looking for an elegant way to solve a (system of) ODEs/functional equations with undetermined coefficients

I want to solve an ODE using undetermined coefficients/guess-and-verify and am looking for an elegant way to use this technique. I am running into a few ugly warts. Here is a basic implementation for ...
0
votes
0answers
34 views

Solving a Partial Differential Equation

I am trying to solve the following PDE: ...
0
votes
0answers
68 views

NDSolve :: ndode error while solving an coupled ODEs

I have a scenario where in trying to solve for the ground-state of a Hamiltonian, I require to be able to solve some coupled differential equations. Prior to this I have already set k=1 and Δ=5 $$ ...
0
votes
1answer
53 views

how to solve second order nonlinear coupled differential equations using NDSolve with hyperbolic function

i have to solve some solitons scattering through this coupled equations. i need to get two different graph, but still the graph did not come out. and also the equations quite complicated containing ...
1
vote
2answers
210 views

How to make Mathematica use the chain rule?

Lets say I have the following PDE: $$x^2 u_{xx} - u_{yy} + u_y = 0$$ And I have the following change of variables: $$ s(x,y) = x e^y \, \, \, , \, \, t(x,y) = x e^{-y}$$ How can I use Mathematica ...
5
votes
3answers
268 views

RK4 Gravity Simulator

I have the following RK4 solver which splits the two 2nd order ODEs, used to calculate x and y positions under the influence of a gravitating body where $$x''(t)=\frac{G m ...
2
votes
1answer
118 views

Euler's method for a 2nd order ODE

This is my first post on this site. Also, I'm new to Mathematica. I'm trying to solve my first problem with Mathematica. It's about solving a 2nd order differential equation. I dont have the explicit ...
2
votes
1answer
258 views

Schroedinger eigenvalue problem in two dimensions (Harmonic Oscillator)

I read here, the discussion about how to solve one dimensional eigenvalue problem. I am wondering, how can one generalize these methods to two dimensions. For example: ...
-1
votes
2answers
73 views

Solving partial differential equation with DSolve does not give a result [closed]

I am trying to solve the equation: $-(d^2/dx^2+d^2/dy^2)\psi+(x^2+y^2-2)\psi=0$ Here, is my code: ...
0
votes
2answers
85 views

Eigenvalue problem and plotting its eigenfunctions [duplicate]

How many different ways can one solve an eigenvalue problem and plot its corresponding eigenfunctions in Mathematica? For example for Harmonic Oscillator? Which one is the most accurate one? Thanks ...
1
vote
0answers
55 views

Solving two-component two-dimensional differential Equation with NDSolve (Brusselator Model)

I'm trying to solve a two-component two-dimensional reaction-diffusion differential equation system with Mathematica. The background of the model is the so called "Brusselator Model" where one can ...
0
votes
1answer
93 views

Solving a differential Equation

I am trying to solve -D[((α + γ/2)*a + β/(2*a) - R*a^3)*p[a], a] + 0.5*D[(γ*a^2 + β)*p[a], {a, 2}] == 0 with DSolve, but it ...
0
votes
0answers
80 views

NDSolve gives wrong results for “stiff system”

I have a physical problem in which I want to solve for c[e] as a function of e, where c is ...
0
votes
3answers
151 views

Solving One Equation with Two Variables

I am trying to solve an equation with two variables. It is the last step in the process of using the method of undetermined coefficients to solve a nonhomogeneous differential equation. The equation ...
0
votes
1answer
86 views

Solving for the time-evolution operator in a periodically driven system

I am looking at the Hamiltonian $$H(t)=\begin{pmatrix} 0 & e^{i\Omega t}\\ e^{-i\Omega t}& 0\end{pmatrix}$$ I am trying to solve for the unitary operator $U(t,0)=\mathcal{T}\exp(-i\int_0^t ...
1
vote
1answer
128 views

Solving a complex-valued differential equation with NDSolve

I am trying to solve $dx/dt=\sqrt{1+(ix)^{1.8}}$ for initial condition $x[0] =-0.9877 + i 0.1563$, where $x$ is a complex variable. I would like to plot the imaginary part of the solution versus the ...
0
votes
0answers
14 views

Multivariable optimisation for pipe insulation [migrated]

I have two functions: Heat Loss Cost (Ch) Ch = 0.23 x 8.67q where q is the heat loss of the fluid through an insulated pipe (in watts): ...
0
votes
1answer
35 views

Error message from NDSolve using WhenEvent

I am working with the following NDSolve expression: ...
2
votes
1answer
117 views

Differential Equation in Complex Plane and Parametric Plot

I would like to solve $dx/dt=\sqrt{1 + (I x)^3}$, where x is complex, for some initial condition like $1 - 5 I$ and plot the imaginary part of the solution versus the real part. (A somewhat similar ...
1
vote
2answers
116 views

Complex differential equation

I want to solve $dx/dt=\sqrt{(1-x^2)}$, where $x$ is complex. When I solve it by hand and analytically for some initial value and draw the imaginary part versus the real part, I obtain an ellipse, as ...
1
vote
1answer
124 views

Runge-Kutta 2nd Order ODE Solver

Suppose I have a 2nd order ODE of the form y''(t) = 1/y with y(0) = 0 and y'(0) = 10, and ...
0
votes
1answer
96 views
0
votes
2answers
98 views

Plot slope field in Mathematica for a difficult differential equation

I am trying to plot slope field for $\ddot{a}(t)$ for this differential equation but I don't know how to $\frac{d}{dt}\ddot{a}(t)=2\frac{\dot{a}(t)}{a(t)}\ddot{a}(t)$ I want to show that already ...
2
votes
1answer
81 views

Finding the roots of a function with a parameter

I am using a differential equation method for finding the roots of a function. My function is much more complicated but I can illustrate my problem with a trivial example. The problem occurs when ...
4
votes
3answers
251 views

Creating a 3D List Line Plot From Discrete Points

Given the following Runge-Kutta ODE solver and the graphical output below, how do I get a 3D line plot instead of a 3D point plot? I see that there is no ListLinePlot3D function, so I thought it might ...
1
vote
2answers
75 views

How to set initial guess in NDSolve

I'm trying to solve a BVP using NDSolve and I want to impose the starting initial guess. I googled and looked at the help, but I couldn't find this option. ...
0
votes
0answers
62 views

System of differential equations - solving for a constant

I will reformulate my question in the hopes it will be more intelligible. First, I defined the functions: ...