Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p1 = Plot[2/(1 + 20 x^2), {x, 0, 3}, AxesLabel -> {"x", "y"},
- LabelStyle -> (FontSize -> 16), GridLines -> Automatic,
- PlotRange -> {0, 3}]
- p2 = Plot[1/(1 + 20 x^2)^(1/2), {x, 0, 3}, AxesLabel -> {"x", "y"},
- LabelStyle -> (FontSize -> 16), GridLines -> Automatic,
- PlotRange -> {0, 3}]
- Show[p1, p2]
- GraphIntersection[p1, p2]
- f1 = 2/(1 + 20 x^2);
- f2 = 1/(1 + 20 x^2)^(1/2);
- xp = FindInstance[f1 == f2 && 0 < x < 3, x, Reals, 15] // Values // Flatten
- yp = f1 /. x -> xp
- Plot[{f1, f2}, {x, 0, 3},
- AxesLabel -> {"x", "y"},
- Epilog -> {Red, PointSize[0.02], Point[{First@xp, First@yp}]},
- LabelStyle -> (FontSize -> 16),
- GridLines -> Automatic,
- PlotRange -> {0, 3},
- PlotTheme -> "Detailed"]
- ClearAll[f, g];
- f = 2/(1 + 20 x^2);
- g = 1/(1 + 20 x^2)^(1/2);
- Plot[{f, g}, {x, 0, 3},
- MeshFunctions -> {(f - g) /. x -> # &}, Mesh -> {{0}},
- MeshStyle -> Directive[Red, PointSize[Large]],
- AxesLabel -> {"x", "y"}, LabelStyle -> (FontSize -> 16),
- GridLines -> Automatic, PlotRange -> {0, 3}]
- ClearAll[f2, g2, x];
- f2 = 3/(3 + 20 (Sin@x - 1/2)^2);
- g2 = 1/(1 + 5 (Sin[x] - 3/10)^2)^(1/2);
- Plot[{f2, g2}, {x, 0, 3}, MeshFunctions -> {(f2 - g2) /. x -> # &},
- Mesh -> {{0}}, MeshStyle -> Directive[Red, PointSize[Large]],
- AxesLabel -> {"x", "y"}, LabelStyle -> (FontSize -> 16),
- GridLines -> Automatic, PlotRange -> {0, 3/2}]
- mesh = Last @@@ N[Solve[{f2 == g2, 0 <= x <= 3}, x, Reals] ]
- (* {2.7032,0.438392,2.29184,0.849753} *)
- Plot[{f2, g2}, {x, 0, 3}, Mesh -> {mesh},
- MeshStyle -> Directive[Red, PointSize[Large]],
- AxesLabel -> {"x", "y"}, LabelStyle -> (FontSize -> 16),
- GridLines -> Automatic, PlotRange -> {0, 3/2}]
- (* same picture *)
Add Comment
Please, Sign In to add comment