1
$\begingroup$

I made some function for plotting Domain of differential equation , will show how it works for $y'=\frac{\sqrt{1-x^2}}{\sqrt{1-y^2}}$

g = Sqrt[1 - x^2];  h = Sqrt[1 - y^2];
f = g/h;
vars = {x, y};
ssp1 = NSolve[{g == 0, h == 0}, vars];
ssp = Values[ssp1];
DomainDJ[f_, vars_] := 
  RegionUnion[ImplicitRegion[FunctionDomain[f, vars], Evaluate@vars], 
   ImplicitRegion[FunctionDomain[1/f, vars], Evaluate@vars]];

PlotDomainDJSP[f_, vars_, sp_] := Module[{df}, spt = Transpose[sp];


   df = DomainDJ[f, vars];

   Show[
        RegionPlot[df],
        ListPlot[sp, PlotStyle -> Directive[PointSize[Large], Red]]
        ]
                                        ];

PlotDomainDJSP[f, vars, ssp]

enter image description here

Thats Domain of that Differential equation . I got few question.

(The idea why is not simple show region plot is because regionplot do not show that singular points are not in region , so i made some extra Listplot to show us it )

  1. How i can make to make large space on Plot, for example if is Domain from -1

  2. Can i make in that function also GeneralSolution=DSolve[...] ,so then plot that General Solution and finaly Show[ (all 3 (domain of d.e ,listpoint with singular points ,general solution] .

    I cant DSolve[f,y[x],x] , because in $f$ is not y[x] (its y ) , if i try to change g=y[x]... or something like f=y[x]... my function for ploting will not work.

$\endgroup$
  • 1
    $\begingroup$ Change f to f /. y -> y[x] inside DSolve $\endgroup$ – Michael E2 Nov 27 '18 at 13:10
  • $\begingroup$ You think DSolve[{y'[x] == f /. y -> y[x]}, y[x], x] ? $\endgroup$ – Милош Вучковић Nov 27 '18 at 13:16
  • 1
    $\begingroup$ Probably better with parentheses: DSolve[{y'[x] == (f /. y -> y[x])}, y[x], x] $\endgroup$ – Michael E2 Nov 27 '18 at 17:21
  • $\begingroup$ Ye it works ,have you an idea for 1. question ? $\endgroup$ – Милош Вучковић Nov 27 '18 at 17:23
  • 1
    $\begingroup$ PlotRange -> {{xmin, xmax}, {ymin, ymax}}? Look up PlotRangePadding, too. $\endgroup$ – Michael E2 Nov 27 '18 at 17:29

Your Answer

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

Browse other questions tagged or ask your own question.