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