Skip to main content
added 1 character in body
Source Link

I want to get the differential solution numerically. I used wolfram alpha. here on is the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759link).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid oscillation at large distances?

Thanks.

I want to get the differential solution numerically. I used wolfram alpha. here on the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid oscillation at large distances?

Thanks.

I want to get the differential solution numerically. I used wolfram alpha. here is the link.

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid oscillation at large distances?

Thanks.

added 7 characters in body
Source Link

I want to get the differential solution numerically. I used wolfram alpha. here on the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid zerooscillation at large distances?

Thanks.

I want to get the differential solution numerically. I used wolfram alpha. here on the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid zero at large distances?

Thanks.

I want to get the differential solution numerically. I used wolfram alpha. here on the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid oscillation at large distances?

Thanks.

Source Link

Numerical solution to Differential equation

I want to get the differential solution numerically. I used wolfram alpha. here on the link (https://www.wolframalpha.com/input/?i=x%27%27%5Br%5D+%2B+1%2Fr+*x%27%5Br%5D+-+0.5%2F%28r%5E2%29*Sin%5B2+x%5Br%5D%5D+%2B+2%2Fr*Sin%5Bx%5Br%5D%5D%5E2+-+++0.2+Sin%5Bx%5Br%5D%5D+-+Sin%5B2*x%5Br%5D%5D+%3D%3D+0%2C+x%5B0.00001%5D+%3D%3D+Pi%2Cx%27%280.00001%29%3D%3D-1.10247294987308759).

I tried this code on the Mathematica file.

sols4 = NDSolve[{x''[
       r] + (1/r) x'[r] - (0.5/r^2) Sin[2 x[r]] + (2/r) Sin[x[r]]^2 - 
      0.2 Sin[x[r]] - Sin[2 x[r]] == 0, x[0.00001] == Pi, 
    x'[0.00001] == -1.1024724270140055}, x[r], {r, 0.00001, 100}, 
   Method -> "BDF"];
Plot[Evaluate[x[r] /. sols4], {r, 0.00001, 100}]

It makes me able to get the solution. But I also need a parametric plot as mentioned in wolfram alpha. How I can have that plot? Additionally, as I am using a shooting method and I need a solution to be zero at infinity. Can anyone tell me how I can avoid zero at large distances?

Thanks.