2
$\begingroup$

I really don't know how to realize this method. The examples in internet and the reference aren't helpful for me.

1) I have the values for today:

 x[0] == 0, y[0] == 0.84, r1[0] == 0.39, r2[0] == 0.39, z[0] == 0

Now I need the initial conditions at t=-20 that reproduces the values today.

alpha = 0.5
beta = 1

sol = First@NDSolve[{

 x'[t] == -x[t]*a[t] - 3*x[t] + alpha*y[t]^2 + 
   1/2*beta*(r1[t]^2 - r2[t]^2),
 y'[t] == -y[t]*a[t] - alpha*x[t]*y[t], 
 r1'[t] == -r1[t]*a[t] - 3/2*r1[t] + beta*x[t]*r1[t], 
 r2'[t] == -r2[t]*a[t] - 3/2*r2[t] - beta*x[t]*r2[t],
 z'[t] == -z[t]*a[t] - 2*z[t],
 x[0] == 0, y[0] == 0.84, r1[0] == 0.39, r2[0] == 0.39, z[0] == 0},
 {x, y, r1, r2, z},
{t, 0, -20}];
a[t_] = -1/2*(3 - 3*y[t]^2 + 3*x[t]^2 + z[t]^2)

Most of the examples are integrated in a plot. First I don't want that.

2)Is it maybe also possible to say that I have the conditions at the present as follows:

  x[t]^2 + y[t]^2==0.5
  r1[t]^2 + r2[t]^2==0.5

PS: This topic can be deleted: boundary problem

$\endgroup$
  • $\begingroup$ In your previous question, you ask for $x^2+y^2=\text{const}$ only at $t=0$, but in this question you ask for conservation of $x^2+y^2$ respecting to $t$, am I right? $\endgroup$ – Silvia Jun 25 '13 at 18:52
  • $\begingroup$ I just want to mention, that you can delete your question all by yourself, by click the delete button at the bottom of your question. $\endgroup$ – xzczd Jul 27 '13 at 8:18
1
$\begingroup$

I think you're almost finished on 1) :

a[x_, y_, z_] = -1/2*(3 - 3*y^2 + 3*x^2 + z^2);

sol[t_] = {x[t], y[t], r1[t], r2[t], z[t]} /. 
 First@NDSolve[
{x'[t] == -x[t]*a[x[t],y[t],z[t]] - 3 x[t]+alpha*y[t]^2 + 1/2*beta*(r1[t]^2 - r2[t]^2), 
 y'[t] == -y[t]*a[x[t], y[t], z[t]] - alpha*x[t]*y[t], 
 r1'[t] == -r1[t]*a[x[t], y[t], z[t]] - 3/2*r1[t] + beta*x[t]*r1[t], 
 r2'[t] == -r2[t]*a[x[t], y[t], z[t]] - 3/2*r2[t] - 
   beta*x[t]*r2[t], 
 z'[t] == -z[t]*a[x[t], y[t], z[t]] - 2*z[t], 
 x[0] == 0, y[0] == 0.84, r1[0] == 0.39, r2[0] == 0.39,  z[0] == 0}, 
 {x[t], y[t], r1[t], r2[t], z[t]}, {t, -20, 0}];

Check :

sol[0]
(* {0., 0.84, 0.39, 0.39, 0.} *)

Answer :

sol[-20]
(* {-1., -1.4744*10^-9, 0.0000573562, -2.75559*10^-14, 0.} *)

Point 2) is more interesting but I don't know how to deal with it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.