Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5366 > unrolled thread
| Started by | "jamievicary@NgOmSaPiAlM.com" <jamievicary@gmail.com> |
|---|---|
| First post | 2011-10-04 05:38 +0000 |
| Last post | 2011-10-07 08:52 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Find a single solution to a system of equations "jamievicary@NgOmSaPiAlM.com" <jamievicary@gmail.com> - 2011-10-04 05:38 +0000
Re: Find a single solution to a system of equations Peter Pein <petsie@dordos.net> - 2011-10-05 08:04 +0000
Re: Find a single solution to a system of equations "jamievicary@NgOmSaPiAlM.com" <jamievicary@gmail.com> - 2011-10-07 08:52 +0000
| From | "jamievicary@NgOmSaPiAlM.com" <jamievicary@gmail.com> |
|---|---|
| Date | 2011-10-04 05:38 +0000 |
| Subject | Find a single solution to a system of equations |
| Message-ID | <j6e648$kd6$1@smc.vnet.net> |
Hi,
I have a system of equations, and want to use Mathematica to find a
single solution. It's no good using Solve, because then Mathematica
tries to find all solutions, and that takes too long. It's no good
containing FindInstance, because my equations contain unknowns.
To illustrate this last point, consider the input
FindInstance[a==b,a]
I want Mathematica to return to me the solution
{{a->b}}
but it doesn't -- it fails, because FindInstance can't cope with
independent variables in the expression.
So, I either need a watered-down Solve, that doesn't try to find every
solution, or a beefed-up FindInstance, that doesn't mind about the
independent variables.
Thanks!
Jamie.
[toc] | [next] | [standalone]
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Date | 2011-10-05 08:04 +0000 |
| Message-ID | <j6h32h$6vd$1@smc.vnet.net> |
| In reply to | #5366 |
Am 04.10.2011 07:38, schrieb jamievicary@NgOmSaPiAlM.com:
> Hi,
>
> I have a system of equations, and want to use Mathematica to find a
> single solution. It's no good using Solve, because then Mathematica
> tries to find all solutions, and that takes too long. It's no good
> containing FindInstance, because my equations contain unknowns.
>
> To illustrate this last point, consider the input
> FindInstance[a==b,a]
> I want Mathematica to return to me the solution
> {{a->b}}
> but it doesn't -- it fails, because FindInstance can't cope with
> independent variables in the expression.
>
> So, I either need a watered-down Solve, that doesn't try to find every
> solution, or a beefed-up FindInstance, that doesn't mind about the
> independent variables.
>
> Thanks!
> Jamie.
>
There is a trick in [1] (by Peter Valko).
Replace b by a constant not related to your problem, apply FindInstance
and substitute the chosen constant with b:
In[1]:= FindInstance[{a == b} /. b -> Catalan, a] /. Catalan -> b
Out[1]= {{a->b}}
Peter
[1] http://forums.wolfram.com/mathgroup/archive/2006/Sep/msg00207.html
[toc] | [prev] | [next] | [standalone]
| From | "jamievicary@NgOmSaPiAlM.com" <jamievicary@gmail.com> |
|---|---|
| Date | 2011-10-07 08:52 +0000 |
| Message-ID | <j6mek9$7dg$1@smc.vnet.net> |
| In reply to | #5380 |
> There is a trick in [1] (by Peter Valko).
> Replace b by a constant not related to your problem, apply FindInstance
> and substitute the chosen constant with b:
>
> In[1]:= FindInstance[{a == b} /. b -> Catalan, a] /. Catalan -> b
> Out[1]= {{a->b}}
Beautiful! Thanks Peter.
But shouldn't Mathematica be able to do this natively??
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web