I would like to solve a simple BVP for a second order differential equation on the domain $I=[0,\pi/2]$ using the finite difference method. $$ u''(x)+u(x)=0\\ u(0)=0\\ u'(\pi/2)=0 $$ By construction, $u(x) = c \sin(x)$ is a solution for any $c$. To use the finite difference method, we construct an $n\times n$ matrix of the form $$ A = \frac{1}{\Delta x^2}\begin{bmatrix} -2&1&0&0&\cdots&0\\ 1&-2&1&0&\cdots&0\\ \ddots&\ddots&\ddots&\ddots&\ddots&\ddots\\ 0&\cdots&0&1&-2&1\\ 0&\cdots&0&0&2&-2 \end{bmatrix}. $$ Here in the first row we are assuming $u_0=0$ for the zero Dirichlet condition, and we are assuming $u_n=u_{n+1}$ so that $u'(x_n)=0$. Then we solve the discretized differential equation, which becomes a linear system, $$ A\vec{u}+\vec{u}=0\\ (A+I)\vec{u}=0, $$ but since $(A+I)$ is invertible, the only solution to this equation is $\vec{u}=0$. How can I recover the non-trivial solutions?
2026-03-27 10:44:37.1774608277
Numerically solving a BVP for a 2nd order ODE with mixed Dirichlet and Neumann boundary conditions with the finite difference method
250 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in ORDINARY-DIFFERENTIAL-EQUATIONS
- The Runge-Kutta method for a system of equations
- Analytical solution of a nonlinear ordinary differential equation
- Stability of system of ordinary nonlinear differential equations
- Maximal interval of existence of the IVP
- Power series solution of $y''+e^xy' - y=0$
- Change of variables in a differential equation
- Dimension of solution space of homogeneous differential equation, proof
- Solve the initial value problem $x^2y'+y(x-y)=0$
- Stability of system of parameters $\kappa, \lambda$ when there is a zero eigenvalue
- Derive an equation with Faraday's law
Related Questions in PARTIAL-DIFFERENTIAL-EQUATIONS
- PDE Separation of Variables Generality
- Partial Derivative vs Total Derivative: Function depending Implicitly and Explicitly on Variable
- Transition from theory of PDEs to applied analysis and industrial problems and models with PDEs
- Harmonic Functions are Analytic Evan’s Proof
- If $A$ generates the $C_0$-semigroup $\{T_t;t\ge0\}$, then $Au=f \Rightarrow u=-\int_0^\infty T_t f dt$?
- Regular surfaces with boundary and $C^1$ domains
- How might we express a second order PDE as a system of first order PDE's?
- Inhomogeneous biharmonic equation on $\mathbb{R}^d$
- PDE: Determine the region above the $x$-axis for which there is a classical solution.
- Division in differential equations when the dividing function is equal to $0$
Related Questions in NUMERICAL-METHODS
- The Runge-Kutta method for a system of equations
- How to solve the exponential equation $e^{a+bx}+e^{c+dx}=1$?
- Is the calculated solution, if it exists, unique?
- Modified conjugate gradient method to minimise quadratic functional restricted to positive solutions
- Minimum of the 2-norm
- Is method of exhaustion the same as numerical integration?
- Prove that Newton's Method is invariant under invertible linear transformations
- Initial Value Problem into Euler and Runge-Kutta scheme
- What are the possible ways to write an equation in $x=\phi(x)$ form for Iteration method?
- Numerical solution for a two dimensional third order nonlinear differential equation
Related Questions in BOUNDARY-VALUE-PROBLEM
- Why boundary conditions in Sturm-Liouville problem are homogeneous?
- What's wrong with the boundary condition of this $1$st order ODE?
- How do I sum Green's functions to get an approximate solution?
- Imposing a condition that is not boundary or initial in the 1D heat equation
- can I solve analytically or numerically the equation $\vec{\nabla}\cdot\vec{J}=0$ with the following boundaries?
- Existence and uniqueness of weak solutions to the homogeneous biharmonic equation.
- Boundary Summation Problems
- Over specification of boundary conditions on closed surfaces for Poisson's equation
- Heat Equation in Cylindrical Coordinates: Sinularity at r = 0 & Neumann Boundary Conditions
- Is there a relation between norm defined on a vector space V and norm defined on its boundary?
Related Questions in FINITE-DIFFERENCES
- 4-point-like central finite difference for second partial derivatives
- Numerical method for fourth order PDE.
- Finite difference approximation of $u''(x)+u(x)=0, u(0)=1, u(\pi)=-1$
- Numerically compute Laplacian of a scalar field in a non-orthogonal grid
- write second order difference as a convolution operator
- Do the second differences of the fifth powers count the sphere packing of a polyhedron?
- Discretization for $\partial_tu = \partial_x[g\times\partial_xu]$
- Discretization of 4th order ODE
- Trying to use Matlab to find Numerical Solution to $u''(x)+e^{u(x)}=0, u(0)=0, u(1)=0$ - Newton's method
- Finite difference: problem on edge of Dirichlet and Neumann boundary
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
The point is that the number $\pi/2$, that is to say the domain size in which these boundary conditions result in an eigenvalue of $-1$, is part of the solution of the problem. It will come with its own numerical error. This formulation means you are asked to find $L$ such that $u''+u=0,u(0)=0,u'(L)=0$ has a nontrivial solution. This $L$ is $n\Delta x$, so you want $A+I$ to be singular, or equivalently you want $\Delta x^2 A + \Delta x^2 I$ to be singular. So you want $\Delta x$ to be $\sqrt{-\lambda}$ for an eigenvalue $\lambda$ of the matrix $\Delta x^2 A$ (which depends only on $n$ and not on $\Delta x$).
If you don't like the idea of the domain size as a variable, then you can hold the domain size fixed at $\pi/2$ and allow for the numerical eigenvalue to differ from $-1$ instead.
Either way as you observed you need to leave some slack, because if the domain is size $\pi/2$ then the eigenvalue you get is never exactly $-1$, and conversely if you set the eigenvalue to be exactly $-1$ then the domain size you get is not exactly $\pi/2$.