Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Insert predefined values into Solve result list' topicStudent Support Forum > General > Archives > "Insert predefined values into Solve result list"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Peter Pein
10/30/11 09:44am

Hi,

simply replace a list of zero or more rules by that list with your rule appended:

In[1]:= additional = Value -> 3;

In[2]:= Solve[x^2 - 4 == 0, x] /. {r___Rule} :> {r, additional}
Out[2]= {{x -> -2, Value -> 3}, {x -> 2, Value -> 3}}

In[3]:= Solve[x^2 + 4 == 0, x, Reals] /. {r___Rule} :> {r, additional}
Out[3]= {Value -> 3}

Peter


URL: ,

Subject (listing for 'Insert predefined values into Solve result list')
Author Date Posted
Insert predefined values into Solve result list Indrek 10/26/11 03:59am
Re: Insert predefined values into Solve result ... Peter Pein 10/30/11 09:44am
Re: Re: Insert predefined values into Solve res... Indrek 10/31/11 08:21am
Re: Re: Re: Insert predefined values into Solve... Peter Pein 11/01/11 5:49pm
Re: Re: Re: Re: Insert predefined values into S... Indrek 11/03/11 06:34am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic