Beginner to mathematica

• Nov 10th 2008, 02:00 PM
Beginner to mathematica
Hello,
I need to graph this circle in parabola(below) with mathematica?How can i do? Thanks.(parabola is y=x^2)
• Nov 11th 2008, 02:17 AM
mr fantastic
Quote:

Hello,
I need to graph this circle in parabola(below) with mathematica?How can i do? Thanks.(parabola is y=x^2)

This post is a subset of the later post found here: http://www.mathhelpforum.com/math-he...-parabola.html
• Nov 11th 2008, 10:01 AM
Quote:

Originally Posted by mr fantastic
This post is a subset of the later post found here: http://www.mathhelpforum.com/math-he...-parabola.html

You are right but i don't know how to graph on wolfram mathematica.Bevause of this i wrote on computer software?I need commands to graph this circle in parabola on mathematica.
• Nov 11th 2008, 10:28 AM
shawsend
There are several ways. Here's one using ContourPlot and the formula given in the citation abovel:

Code:

```ContourPlot[{y == x^2, x^2 + (y - 1/2)^2 ==     1/4}, {x, -3, 3}, {y, -3, 3},   Axes -> True]```
Here's another way using Plot:

Code:

```f1[x_] := 1/2 + Sqrt[1/4 - x^2]; f2[x_] := 1/2 - Sqrt[1/4 - x^2]; f3[x_] := x^2; p1 = Plot[{f1[x], f2[x]}, {x, -2^(-1), 1/2},   PlotRange -> {{-3, 3}, {-3, 3}},   AspectRatio -> 1] p2 = Plot[f3[x], {x, -2, 2}]; Show[{p1, p2}]```
• Nov 11th 2008, 10:51 AM
Thank you very much shawsend.(Bow)(Hi)
• Nov 11th 2008, 02:35 PM
shawsend
Third and fourth way just for fun:

Code:

```p1 = ParametricPlot[{t, t^2}, {t, -2, 2}] p2 = ParametricPlot[{(1/2)*Cos[t],     1/2 + (1/2)*Sin[t]}, {t, 0, 2*Pi}] Show[{p1, p2}] Show[{Plot[x^2, {x, -2, 2}],   Graphics[Circle[{0, 1/2}, 1/2]]},   AspectRatio -> 1]```
• Nov 12th 2008, 08:51 AM
shawsend,
Thank you very much again but the third way gives an error during calculating.
• Nov 12th 2008, 10:09 AM
shawsend
Hi. I don't get an error. Maybe it's the version. I have ver 6. Also, sometimes an error occurs when variables have already been assigned numeric quantities. Either clear these variable names via Clear[x,y,z] or just restart Mathematica to see if the error is eliminated.
• Nov 13th 2008, 01:39 PM
Hood
Yeah, I remember show was super-funky in Mathematica 5 and earlier. Its so much better now, although the order of arguments makes a big difference in the results.

The best way to do this kind of thing is always with contour plot.
By the way, only in the last method do you need to use show. Show is still best avoided if possible, as it doesnt work perfectly (though undeniably much, much better than it used to)

The circle may be undefined outside of [-1/2,1/2], but plot throws no error:
Plot[{1/2 + Sqrt[1/4 - x^2],1/2-Sqrt[1/4 - x^2],x^2},{x,-3,3}]

Replacing t with Pi t maps [-2,2] into [-2 Pi, 2 Pi], which is redundant but works:
ParametricPlot[{{t, t^2}, {1/2 Cos[Pi t],1/2+1/2Sin[Pi t]}}, {t, -2, 2}]

I always prefer not to leave so many variables behind in an operation, unless some of the steps take so much time that it is necessary.