MathGroup Archive 2003

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

Search the Archive

Re: Condition/constraint problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40956] Re: [mg40915] Condition/constraint problem
  • From: Bobby Treat <drmajorbob+MathGroup3528 at mailblocks.com>
  • Date: Fri, 25 Apr 2003 08:06:38 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

The Derivative function is simply getting it wrong.  (It's a bug.)

Here's a dissection that shows approximately what is happening:

vx1[t_] := 0.0015 + 0.0012 Sin[70 t] /; t < 5
vx2[t_] := 0.0015 + 0.0012 Sin[70 t]
fin1 = Dt[vx1[t], t]
fin2 = Dt[vx2[t], t]
plot1 = Plot[{fin1, fin2}, {t, 0, 2}, PlotStyle -> {Red, Blue}, 
PlotPoints ->
     100];
{data1, data2} = Cases[plot1, Line[a_] :> a, Infinity];
Chop@Fit[data1, {1, Sin[70t], Cos[70t]}, t]
Chop@Fit[data2, {1, Sin[70t], Cos[70t]}, t]

-0.0401102 Cos[70 t]
0.084 Cos[70 t]

I experimented with adding other fit functions, and it seems clear 
that, in fact,

fin1 == -0.0401102 Cos[70 t]

I have not yet guessed the formula that led to this, but it's clearly 
wrong.

Bobby

-----Original Message-----
From: Bamboo <u8514501 at cc.nctu.edu.tw>
To: mathgroup at smc.vnet.net
Subject: [mg40956] [mg40915] Condition/constraint problem


Dear all,

I find a problem and don't know why.  The input is as following.
If a condiction(constraint) is set to the function, vx1[t],
the derivative of vx1[t] is worng (fin1 is not equal to fin2).
Any help welcome.

vx1[t_] : = 0.0015 + 0.0012 Sin[70 t] /; t < 5
vx2[t_] : = 0.0015 + 0.0012 Sin[70 t]
fin1 = Dt[vx1[t], t]
fin2 = Dt[vx2[t], t]
Plot[fin1, {t, 0, 2}]
Plot[fin2, {t, 0, 2}]

Thanks,
Bamboo


  • Prev by Date: Re: Displaying many digits
  • Next by Date: RE: Where have all the axes gone?
  • Previous by thread: Re: Condition/constraint problem
  • Next by thread: Re: Re: Condition/constraint problem