# How to solve this nonlinear boundary value problem?

I am new to Mathematica (or computations for that matter), can one please tell me how to solve these coupled differential equations, with boundary conditions on infinity, using NDsolve?

x'[t] = x[t]x[t]x[t] -3x[t]y[t]y[t] + x[t] + 1

y'[t] = y[t]y[t] - 3x[t]x[t]y[t] -y[t] - 1


x'[t] represents derivative with respect to t.

with x-> -0.799 as t--> infinity, and y--> -0.304 as t--> infinity.

It would be a big help! Thank you!

• First, be sure to use == (not =). And space terms. Jul 24, 2021 at 17:46
• Try sol={x[t],y[t]}/.NDSolve[{x'[t]==x[t]^3-3x[t]y[t]^2+x[t]+1,y'[t]==y[t]^2-3x[t]^2y[t]-y[t]-1,x[101]==-0.799,y[101]==-0.304},{x[t],y[t]},{t,100,101}][[1]];Plot[sol,{t,100,101}] and see if it gives you a plot then very very gently push those 100 and 101 around and see what happens. It looks to me like your system blows up using the default methods.
– Bill
Jul 24, 2021 at 17:47

The problem is ill posed, rhs is not zero at $$t\rightarrow\infty$$. We can check as follows:

f = x[t] x[t] x[t] - 3 x[t] y[t] y[t] + x[t] + 1;
g = y[t] y[t] - 3 x[t] x[t] y[t] - y[t] - 1;

ff = f /. {x[t] -> u, y[t] -> v}
gg = g /. {x[t] -> u, y[t] -> v}
res={u, v} /.NSolve[1 + u + u^3 - 3 u v^2 == 0 && -1 - v - 3 u^2 v + v^2 == 0, {u, v}] // TableForm
(*
0.138034               1.65968
-0.317608-0.766191 I    0.524953 +0.508131 I
-0.317608+0.766191 I    0.524953 -0.508131 I
0.234871 -0.516978 I  -0.769585-0.294646 I
0.234871 +0.516978 I  -0.769585+0.294646 I
0.400906 -1.18382 I    0.186183 -0.171329 I
0.400906 +1.18382 I    0.186183 +0.171329 I
-0.774371              -0.320563
*)


As you can see, there are no your numbers among the solution.

You can generate the phase portrait of your system with

StreamPlot[{1 + u + u^3 - 3 u v^2, -1 - v - 3 u^2 v + v^2}, {u,-2, 2}, {v, -2, 2},
Epilog -> {PointSize[Large], Red, Point[res[[1]]], Green, Point[res[[8]]]}]


• I'd say the last one is probably the branch that the OP is looking for, but had insufficient precision on. Jul 25, 2021 at 10:13
• @Roman Good problem formulation is the first step to the solution. Jul 25, 2021 at 10:21