wolfram mathematica - how to make arcsin not cyclical and have it be evaluated at each point -


so i'm solving set of 4 differential equations in mathematica using ndsolve. use arcsin part of equations. now, arcsin value insensitive value of y, causing solution periodic. example, x=1,y=1, arcsin pi/4. if make x=1,y=-1, still remains pi/4. how avoid cyclic behavior? know, condition should if y<0, add pi solution. i'm failing write correctly.

any appreciated.

     clearall["global`*"]         \[alpha]1 = 0.5;         \[sigma]1 = -1;         subscript[\[capitaltheta], n] = \[pi]/2;         traceractive =          ndsolve[{x'[          t] == ((-\[alpha]1*(x[t] -               x[t]))/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(3/           2)) - (2*            cos[subscript[\[capitaltheta], n] -               arcsin[(x[t] - x[t])/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(1/               2)]]*\[alpha]1*\[sigma]1)/((x[t] - x[t])^2 + (y[t] -               y[t])^2)^(3/          2) + ((y[t] - y[t])*            sin[subscript[\[capitaltheta], n] -               arcsin[(x[t] - x[t])/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(1/               2)]]*\[alpha]1*\[sigma]1)/((x[t] - x[t])^2 + (y[t] -               y[t])^2)^2,         y'[t] == ((-\[alpha]1*(y[t] -               y[t]))/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(3/           2)) - (2*            cos[subscript[\[capitaltheta], n] -               arcsin[(x[t] - x[t])/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(1/               2)]]*\[alpha]1*\[sigma]1)/((x[t] - x[t])^2 + (y[t] -               y[t])^2)^(3/          2) - ((x[t] - x[t])*            sin[subscript[\[capitaltheta], n] -               arcsin[(x[t] - x[t])/((x[t] - x[t])^2 + (y[t] - y[t])^2)^(1/               2)]]*\[alpha]1*\[sigma]1)/((x[t] - x[t])^2 + (y[t] -               y[t])^2)^2, x'[t] == 0, y'[t] == 0, x[0] ==  0.1,         y[0] == 0.02, x[0] == 0, y[0] == 0}, {x, y, x, y}, {t, 0, 1000}]  xlist = flatten[table[x[t] /. traceractive, {t, 0, 100}]]; ylist = flatten[table[y[t] /. traceractive, {t, 0, 100}]];  xlist = flatten[table[x[t] /. traceractive, {t, 0, 100}]]; ylist = flatten[table[y[t] /. traceractive, {t, 0, 100}]];  tracer = transpose@{xlist, ylist}; length[tracer]; activep = transpose@{xlist, ylist};  p1 = listplot[tracer, joined -> true] p2 = listplot[activep,  plotmarkers -> automatic]  show [p1, p2, graphics[{pointsize[0.025], point[{tracer[[1]]}]}],   graphics[{pointsize[0.025], red, point[{tracer[[length[tracer]]]}]}],   plotrange -> all, axesorigin -> {0, 0}] (*black point: tracer initial position, red point: tracer final \ position*) 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -