Re: Graphing, Symbolic Manipulation, and Regressions
- To: mathgroup at smc.vnet.net
- Subject: [mg25568] Re: [mg25523] Graphing, Symbolic Manipulation, and Regressions
- From: BobHanlon at aol.com
- Date: Sat, 7 Oct 2000 03:36:16 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 10/6/2000 12:46:02 AM, ian at v-wave.com writes: >Hello, can anyone please help me by telling me how to graph more than one >function on the same graph; and also how I would go about graphing "non >functions", ex. graphing y= +/-Sqrt[x]. > >Also, is there any way to be able to just *show* the function that I input? >ex. (x(x + 2))/x^2 that would come out as: > > x(x + 2) >--------- > x^2 > >instead of the simplified form: > > 2 + x >------- > x > >Lastly, how would I go about doing regressions? I tried reading the help >files but it did not help me much. For example, if I want to find the >formula for the quadratic equation with the points (1, 3), (-1, -3), (2, >6) >what command would I put in? > Plot[{Sqrt[x], -Sqrt[x]}, {x, 0, 16}, PlotStyle -> RGBColor[0, 0, 1]]; HoldForm[(x(x + 2))/x^2] \!\(\* TagBox[\(\(x\ \((x + 2)\)\)\/x\^2\), HoldForm]\) Needs["Statistics`NonlinearFit`"] data = {{1, 3}, {-1, -3}, {2, 6}}; model = a*x^2 + b*x + c; vars = x; params = {a, b, c}; NonlinearFit[data, model, vars, params] // Chop 3. x And @@ ((3x == y /. {x -> #[[1]], y -> #[[2]]}) & /@ data) True Bob Hanlon