MathGroup Archive 2011

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

Search the Archive

Re: Solve::ivar: xxx is not a valid variable. >>

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117228] Re: Solve::ivar: xxx is not a valid variable. >>
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sat, 12 Mar 2011 05:08:18 -0500 (EST)

Because Solve doesn't control the "scope" of T3.

This works when the variables are undefined:

Solve[Q == m*C*(T3 - T2), T3]

{{T3 -> (Q + C m T2)/(C m)}}

But if T3 has a value:

T3 = 3777.865080388886`;
Solve[Q == m*C*(T3 - T2), T3]

Solve[Q == C m (3777.87 - T2), 3777.87]

In that case, block the variable:

Block[{T3},
  T3 /. First@Solve[Q == m*C*(T3 - T2), T3]]

(Q + C m T2)/(C m)

Bobby

On Fri, 11 Mar 2011 03:34:44 -0600, Morten J=F8rgensen <mail at maarten.dk> 
wrote:

> Hi guys,
> why is it that I get this message
>
> Solve::ivar: 3777.865080388886` is not a valid variable. >>
>
> while using numbers from previous calculations (Q, m, C, T2) in this
> equation
>
> Solve[Q == m * C * (T3 - T2), T3]
>
>
> Regards, Morten
>


--
DrMajorBob at yahoo.com


  • Prev by Date: Re: Gradient Fill Style
  • Next by Date: Re: How change font size of Graph vertex labels?
  • Previous by thread: Re: Solve::ivar: xxx is not a valid variable. >>
  • Next by thread: How change font size of Graph vertex labels?