Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Extracting functions from Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7068] Re: [mg7027] Extracting functions from Solve
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Sat, 3 May 1997 22:04:58 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

 Fri, 2 May 1997
haas at midway.uchicago.edu (mark christopher haase)
[mg7027] Extracting functions from Solve

>How may I extract and define as functions the solutions derived  
from >Solve?
>
>E.g., Solve[x^2+y^2==1,y], I would like to define two functions f1 
> and f2 that are the solutions to this.

Mark:
sol =Solve[x^2+y^2==1,y]

	{{y -> -Sqrt[1 - x^2]}, {y -> Sqrt[1 - x^2]}}
	
{f1[x_],f2[x_]}=(y/.sol)

	{-Sqrt[1 - x^2], Sqrt[1 - x^2]}
	
Check
{f1[x],f2[x]}

	{-Sqrt[1 - x^2], Sqrt[1 - x^2]}
	
Allan Hayes
hay at haystack.demon.co.uk
http://haystack.demon.co.uk


  • Prev by Date: Re: Short[]
  • Next by Date: Mathematica 3 notebook ButtonBoxes with no ButtonFrames?
  • Previous by thread: Re: Extracting functions from Solve
  • Next by thread: Re: Extracting functions from Solve