# Findroot :unable to find a solution that meets the convergence criteria

The stationary solutions of the Klein-Gordon equation refer to time-independent solutions, meaning they remain constant over time. For the non-linear Klein-Gordon equation, you are discussing:$$\frac{d^2 x_n}{dt^2} - \kappa(x_{n+1} - 2x_n + x_{n-1}) = \omega^2 \ (x_n - \beta x_n^3)$$

Stationary solutions arise when the time derivative term,$$\frac{d^2 x_n}{dt^2}$$, is zero, meaning the motion of the system does not change over time. This leads to a static differential equation:$$- \kappa(x_{n+1} - 2x_n + x_{n-1}) = \omega^2 (x_n - \beta x_n^3)$$

This equation describes how particles in the lattice interact with each other and how non-linearity affects the steady state of the system. The solutions to this equation correspond to the various possible stable equilibrium states of the system, where each represents different static distribution patterns of displacements $$x_n$$. The specific form of these stationary solutions depends on the system parameters, such as $$\kappa$$, $$\omega$$, and $$\beta$$, as well as the initial and boundary conditions of the problem. To find these solutions in a more specific form, one might need to solve the equation using analytical or numerical methods, considering the different cases that could arise in such a non-linear system. By interpreting the equation in this way, we can relate the dynamics described by the discrete Klein - Gordon equation to the behavior of DNA molecules within a biological system. This analogy allows us to understand the behavior of DNA in terms of concepts from physics and mathematical modeling.

numBases = 100;  (*Number of base pairs,representing a segment of DNA*)
kappa = 0.1;    (*Elasticity constant,chosen to reflect the \
stiffness;arbitrary unit*)
0.2;   (*Frequency term,speculative and low to reflect slow \
dynamics*)
beta = 0.05;    (*Nonlinearity coefficient small to introduce mild \
nonlinearity*)

(*Initialize a list for the x_n variables*)
variables = Table[x[n], {n, 1, numBases}];

(*Define the equations based on the discretized version of the \
Klein-Gordon equation*)
equations =
Table[-kappa (x[n + 1] - 2 x[n] + x[n - 1]) ==
omegaD^2 (x[n] - beta x[n]^3), {n, 2, numBases - 1}];

(*Add boundary conditions,for example,x[1] and x[numBases] fixed to 0 \
or any other value*)
boundaryConditions = {x[1] == 0, x[numBases] == 0};

(*Combine the equations with the boundary conditions*)
fullSystem = Join[equations, boundaryConditions];

(*Solve the system with an initial guess for each variable*)
initialGuess =
Table[{x[n], 0.01}, {n, 1,
numBases}];  (*or any small value close to expected solutions*)

solution =
FindRoot[fullSystem, initialGuess];

(*Extract the solution for plotting or analysis*)
solvedValues = Table[x[n] /. solution, {n, 1, numBases}];

(*Optionally, you can plot the solution to visualize the stationary \
states*)
ListPlot[solvedValues, PlotStyle -> PointSize[Medium], Joined -> True,
GridLines -> Automatic, PlotRange -> All,
AxesLabel -> {"n", "x[n]"}, LabelStyle -> {"Medium", Bold}]



now when I change the boundary conditions for example

boundaryConditions = {x[1] == 10, x[numBases] == 10};


and try to solve the system

solution =
FindRoot[fullSystem, initialGuess, MaxIterations -> 500,
AccuracyGoal -> 6, PrecisionGoal -> 6,
WorkingPrecision -> 30  (*Increase working precision*)];


• What about your question? Do you need solution or explanation of this message? Option WorkingPrecision -> 30 means that all parameters are given with high precision, while in your code all parameters defined with floating point or \$MachinePrecision. Use for example kappa = 1/10; omegaD = 1/5; beta=1/20; initialGuess = Table[{x[n], 1/100}, {n, 1, numBases}]. For solution see my answer. Mar 18 at 23:42

System can be solved with Newton method as follows

numBases = 100;  (*Number of base pairs,representing a segment of DNA*)
kappa = 0.1;    (*Elasticity constant,chosen to reflect the \
stiffness;arbitrary unit*)
0.2;   (*Frequency term,speculative and low to reflect slow \
dynamics*)
beta = 0.05;    (*Nonlinearity coefficient small to introduce mild \
nonlinearity*)

(*Initialize a list for the x_n variables*)
variables = Table[x[n], {n, 1, numBases}];

(*Define the equations based on the discretized version of the \
Klein-Gordon equation*)
equations =
Table[-kappa  (x[n + 1] - 2  x[n] + x[n - 1]) ==
omegaD^2  (x[n] - beta  x[n]^3), {n, 2, numBases - 1}];

(*Add boundary conditions,for example,x[1] and x[numBases] fixed to 0 \
or any other value*)
boundaryConditions = {x[1] == 10, x[numBases] == 10};

(*Combine the equations with the boundary conditions*)
fullSystem = Join[equations, boundaryConditions];

(*Solve the system with an initial guess for each variable*)
initialGuess =
Table[{x[n], 0.1}, {n, 1,
numBases}];  (*or any small value close to expected solutions*)

solution =
FindRoot[fullSystem, initialGuess,
Method -> {"Newton", "StepControl" -> "TrustRegion"}];

(*Extract the solution for plotting or analysis*)
solvedValues = Table[x[n] /. solution, {n, 1, numBases}];

(*Optionally,you can plot the solution to visualize the stationary \
states*)
ListPlot[solvedValues, PlotStyle -> PointSize[Medium], Joined -> True,
GridLines -> Automatic, PlotRange -> All,
AxesLabel -> {"n", "x[n]"}, LabelStyle -> {"Medium", Bold}]