Questions tagged [differential-equations]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

NDSolve numerical problem

I am trying to solve a couple of differential equations given by: F(H(t))=R(phi(t)) phi(t)''+H(t) phi'(t)+ m phi(t)=0 where m=1 and F and R are just particular functions. In the image you can ...
2
votes
1answer
38 views

How to divide a region in FEM with a parametric curve?

I'm using NDSolve with finite element to try to solve a heat transfer problem. The region I have is a rectangle where the four vertices are at ...
1
vote
2answers
31 views

Plotting a complete response to an oscillation; already have particular solution, not sure how to solve for constants in homogeneous solution

I am writing a code that plots an oscillator's response to a periodic excitation. The response consists of the following: x(t) = xh + xp where xh is the homogeneous solution and xp is the particular ...
0
votes
0answers
25 views

Coupled nonlinear differential system with discontinuous functions which values are given by list elements, boundary conditions, NDSolve

I am very new to mathematica, I have googled my problem in vain, hope you can help me. I am currently trying to solve a non linear system of two coupled differential equations given by (41) and (42). ...
10
votes
2answers
215 views

How to model diffusion through a membrane?

This is a follow-up on How to handle discontinuity in diffusion coefficient? Consider diffusion of $u(t,x)$ on the domain $x \in [0,2]$ with some simple boundary conditions such as $u(0) = 2, u(2) = ...
0
votes
0answers
47 views

How to plot a backward bifurcation diagram

Bifurcation Diagram: I want to know how to plot the bifurcation diagram below using Mathematica, I modify a code seen here on the platform but still no get the actual diagram here is my code: ...
8
votes
1answer
117 views

How to handle discontinuity in diffusion coefficient?

I am looking to solve the diffusion equation with a discontinuous jump in the diffusion coefficient. In 1D, the diffusion equation for $u(t,x)$ is: $$ \partial_t u = \partial_x (D \partial_x u), $$ ...
3
votes
2answers
78 views

Why Mathematica gives me different results depending on the order I set the parameters when I solve this differential equation?

I am asking Mathematica to solve a differential equation using DSolve, with two different parameters, q and m, and then evaluate at a point. So I write the ...
1
vote
2answers
103 views

What can I do to solve the numerical solution of this partial differential equation?

I want to solve the following differential equation. It is about modeling the vibration of a linearized elastic rod. $$\frac{\partial^2} {\partial x^2} ( E I \frac{\partial^2 w} {\partial x^2}) + \...
1
vote
1answer
62 views

How to solve first order complex differential equation?

I want to solve these differential equations and want to get the value of 'a1'. I used this code given below but it is not showing any result. If anyone can resolve this will be appreciated. ...
7
votes
2answers
152 views

Converting a backward/forward sweep code for optimal control to _Mathematica_

I'm trying to convert to Mathematica a simple backward/forward sweep (with RK4 integrator) code to solve an optimal control problem in epidemiology, but I'm getting some error messages and I cannot ...
0
votes
0answers
51 views

Differentiation of a system of functions

I have a system of equations as follows: $$ \zeta (l_x , t, \tau , \eta)=\epsilon\left(l_{x}\hat{x}-\lambda t\right)+\epsilon^{2}P_{o}(\eta,\tau) $$, $$ \eta (l_x , t, \tau , \zeta)=\epsilon\left(l_{...
1
vote
1answer
42 views

How to use output of NSolve for further calculation and than plot?

I am trying to plot the output using these linear equations but finding some difficulty. Here I am using the output of these linear equations and after that using them in another formula and after ...
6
votes
3answers
187 views

How to define the boundary condition in 1D Heat transfer

I am trying to calculate the head transfer among a 1-D rod, with one end insulated while the right end is immersed in constant temperature surface T=0. Assume that the initial temperature of the rod ...
3
votes
1answer
155 views

First to fifth order natural frequencies of a cantilever beam with known material constants

We assume that the homogeneous Euler-Bernoulli cantilever with constant cross-section length is 1, the material constant EI is 1 and ρS is 1. According to the constraints, we can establish the ...
0
votes
1answer
37 views

Problems with plotting using NDSolveValue

I have solved, using NDSolveValue a PDE. I now want to create a plot of my function u[x,t] and evaluate this function at x = 1 and t = 1/4 and x = [Pi]/2, and t = 1/2. Im not sure how to extract ...
1
vote
1answer
44 views

Changing the equation using WhenEvent in NDSolve

I want to change part of a set of equations by using WhenEvent in NDSolve. I have made a much less complicated minimum working ...
1
vote
1answer
35 views

Using WhenEvent to Bound Variables

I would like to use the WhenEvent function (link here) to set a bound on a dynamic variable in a set of ODEs. That is, when the variables ...
2
votes
1answer
93 views

How do I get a better result in NDSolve for 2D wave?

Consider the following equation solved with NDSolve: ...
2
votes
0answers
77 views

Kernel crash after repeated use of NDSolve

I am trying to solve the Einstein-Klein-Gordon system (equations below) for different piecewise potentials but the kernel keeps crashing after repeated use of NDSolve. Apparently, everything works ...
0
votes
0answers
44 views

Solving nonlinear ODE analytically [closed]

DSolve[u''''[z] (1 - u[z])^2 + u'''[z] (1 - u[z]) + u''[z] (-2 - b (1 - u[z])^3 + (1 - u[z])) == 0, u[z], z] Why can't Mma solve this differential equation?
1
vote
0answers
37 views

problem with the analytical solution of differential system equations

I have the following system of differential equations: $\begin{pmatrix}\dfrac{d\eta}{dt} \\\dfrac{d\eta^{\dagger}}{dt} \end{pmatrix} = \begin{pmatrix}(1+I\kappa)(w-IJ) & R_1+i R_1\kappa \\-R_1+...
0
votes
0answers
39 views

Plot solutions to differential equations

I have a combined system of two differential equations. I would like to know how to plot them
1
vote
1answer
66 views

NDSolve Unable to Produce Solution for Second-Order Differential Equation [closed]

Below is the equation that I am trying to solve and ultimately plot: $$y''+5y'+6y=e^{-3x}; \;y(0)=-\frac{1}{2}, \; y'(0)=0, \; x \in [0,2]$$ To solve this on Mathematica, I followed its help page and ...
0
votes
0answers
54 views

Heat Equation with insulated ends

I have a problem with Heat Equation.Imagine this.We have this equation ----> ut=uxx with boundary conditions u(0,t)=0 u(25,t)=0 and initial condition u(x,0)=x. Find u(x,t) and make the Plot ( doesnt ...
4
votes
1answer
94 views

Phase Portraits on Compact Surfaces

I'm writing my senior thesis on the theory generic flows on compact surfaces. This is a beautiful geometric subject, and I want beautiful visualizations to match. Here is my strategy: Step 1: Given ...
0
votes
0answers
28 views

How to use an InterpolatingFunction inside CreateSystemModel

I would like to to construct an equation with CreateSystemModel, e.g. $\dot{y}(t) = f(x(t))$, where $f$ is an interpolated function. I tried the following code <...
0
votes
0answers
89 views

Problem in solving system of equations using “Solve”

I have an equation in its normalized form as: $\frac{v(x)}{V_{cc}}=C_1\cos qx+C_2\sin qx+1+ \frac{q^2}{1-q^2}.\frac{V_R} {V_{cc}}\sin (x+\phi)$ Where $$q=\frac{1}{\omega\sqrt{LC}}$$ With the ...
0
votes
1answer
36 views

Grid for NDSolve

i want to get the output of NDsolve in the form of a tbale/grid that can be exported to .xls/.csv. NDSolve[x'[t]==Exp[t], y'[t]==cos[t], x[0]=0, y[0]=1,{x[t],y[t]},{t,0,10}] I am expecting an output ...
0
votes
2answers
77 views

How to plot the phase portrait of a second-order differential equation?

I am relatively very new to mathematica, but I have been trying to figure this out for hours. I have a second-order differential equation, $$ ay''+by'+cy=0 $$ and I have converted it into a first-...
4
votes
1answer
181 views

Solution to the inverted pendulum problem (system of non-linear ODE)

A classic control systems problem is that of the translational inverted pendulum, as shown below. By applying a force $f(t)$ to the car (e.g. through a DC motor attached to the car), the goal is to ...
1
vote
0answers
44 views

Numerical precision - simulating an unstable equilibrium

I was playing around with NDSolve and the following ODE s = NDSolve[{y''[x] == -Sin[y[x]], y[0] == \[Pi], y'[0] == 0 }, y, {x, 0, 120}] The equation and the ...
2
votes
0answers
66 views

Large system of implicit differential equations

We are trying to solve a large system of implicit system of differential equations for complex variables $\boldsymbol{\alpha}\left(t\right)$ and $\boldsymbol{\lambda}\left(t\right)$. System consists ...
1
vote
1answer
63 views

Changing a parameter by specific time in NDSolve in a COVID-19 spread simulation

I'm trying to create a mathematical model for COVID-19, to help my city, using the follow system of equations: ...
6
votes
4answers
399 views

Quasi-linear PDE equation

I have problem with first order quasi-linear PDE. I used Mathematica to solve the equation but it doesn't work. Would appreciate for some tips. Here is what I have done. Solve equation: $2\frac{\...
5
votes
3answers
188 views

Get a symbolic solution from DSolve

My input is DSolve[{s''[t] == g Sin[θ], s[0] == 0, s'[t]^2 == 2 g l Cos[θ]}, s[t], t] I will get a pop-up DSolve::overdet: There are fewer dependent ...
-1
votes
0answers
46 views

How to plot the solution of Systems of Differential Equations vs time?

I,have recently downloaded a Mathematica code.This code prints (Phi^2) for each time, But i'm trying to integrate "n*phi^2" over [-q q] for each time step and plot it vs time (ex:t= 0:1000).How should ...
5
votes
2answers
134 views

3d system: stream plot and function

I have a 3D ODE-system $$x'=f_1(x,y,z),\quad y'=f_2(x,y,z),\quad z'=f_3(x,y,z) $$ living on the sphere and an equilibrium $(x_0,y_0,z_0)$. I would like to plot a function $V(x,y,z)$ to see whether t ...
0
votes
1answer
57 views

Trying to solve ordinary Differential Equation using DSolve in wolfram Mathematica. The results are inconsistent with the expected ones

I have a differential equation from one of the research articles as $$ \omega^{2}.L.C\frac{d^2v(x)}{dx^2}+v(x)-V_{cc}+V_{R}\sin(x+\phi)=0 $$ Whose General solution is given in the normalized ...
0
votes
2answers
44 views

Plot the solution for system of ODEs

I have solved this example available in MATHEMATICA: ...
4
votes
0answers
69 views

1-D stress (displacement) analysis in annulus by considering viscoelasticity

I am a new Mathematica user, and I was trying to solve a stress (or displacement) field problem in an annulus. Here is the problem in the polar coordinate: The inner radius of the annulus is $b$, ...
0
votes
1answer
51 views

Find minimum value of parameter

I have solve the following nonlinear ODE, (*u'(t)=u^2(t)+1, 0<t<=1*) and got the following approximate solution: ...
10
votes
2answers
325 views

Testing Turbulence Models

In the 90s, several turbulence models were proposed. Using Mathematica vv 10-12.1 we tested two models: 1) Spalart-Allmaras turbulence model (SA) for aerodynamic applications, published in AIAA ...
3
votes
1answer
72 views

How to numerically obtain the first ten eigenvalues of a 3D Sturm-Liouville problem

I'm trying to numerically obtain the first ten eigenvalues of a 3D S-L problem via NDEigenvalues but with no success. The problem is given by ...
3
votes
1answer
104 views

How to use Reduce with inverse trigonometric functions?

Clear["`."] rm = 1; al = Pi/6; csal = Cos[al]; DSolve[{rm ph'[s] == Sin[si[s]] Tan[si[s]]^2 csal, rm si'[s] == -Sin[ph[s]] Sin[si[s]]^2}, {ph, si}, s] How to ...
2
votes
2answers
131 views

Find the missing initial conditions for system of ODES

I want to solve the following system of ODEs: ...
8
votes
1answer
135 views

Why can't I use Inactive[D] in NDSolve?

I have a 2D rectangular domain with -L/2 < x < L/2 and 0 < y < D0, which is divided into two parts, with a ...
1
vote
0answers
56 views

Finding the solution of a PDE doesn't work

I'd like to find the solution of an ODE of order 2 : ...
3
votes
1answer
45 views

IVP Piecewise ODE: Changing the Domain outside region of interest changes result dramatically

Good afternoon, I am attempting to solve the following ODE: ...
0
votes
0answers
51 views

Mathematica fails to solve diffusion pde(focker planck)

I am trying to solve the focker planck equation in mathematica. But this is showing lots of errors. i don't get where the problem lies. The equation is ...

1
2 3 4 5
98