Re: Problems with Solve

• To: mathgroup at smc.vnet.net
• Subject: [mg17046] Re: Problems with Solve
• From: Jan Krupa <krupa at alpha.sggw.waw.pl>
• Date: Wed, 14 Apr 1999 02:11:57 -0400
• Organization: http://news.icm.edu.pl/
• References: <7es42r\$cdb@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Tanveer Choudhury wrote:

> I have an equation
>         eqn == rhs
>
> Solving in the following way
>
>         Solve[eqn,x]
>
> the output is something like
>
>         x->2.11
>
> how do I save the value for x to someother variable...
>
> u can mail to tanveer at wam.umd.edu
>
>         thanx

Have a look at:
http://www.mathematica.com/support/Kernel/Basic/UsingRuleSolutions.html

e.g.:

In[1]:=sol1=Solve[x^4-2==0,x]
Out[1]={x -> -2^(1/4)}, {x -> -I*2^(1/4)}, {x -> I*2^(1/4)},
{x -> 2^(1/4)}}
In[2]:=sol2=x/.sol1
Out[2]={-2^(1/4), -I*2^(1/4), I*2^(1/4), 2^(1/4)}
In[3]:=x1=sol2[[3]]
Out[3]=I*2^(1/4)
In[4]:=x1^4
Out[4]=2

Jan

```

• Prev by Date: Re: Problems with Solve
• Next by Date: Ugly expressions. Was: Toghether, Apart ?
• Previous by thread: Re: Problems with Solve
• Next by thread: Re: Problems with Solve