MathGroup Archive 2007

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

Search the Archive

Re: Paul Abbott Chebyshev Article

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79743] Re: [mg79699] Paul Abbott Chebyshev Article
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Fri, 3 Aug 2007 06:28:11 -0400 (EDT)
  • References: <27830759.1186052816612.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

Judging only from the code you posted, the subscripted T values are  
undefined, hence non-numeric... aAnd NIntegrate is a NUMERIC integrator.  
Switching to Integrate gives a result, but I have no idea whether it's  
what you want/expect.

rhs = 1 +
   1/Pi cs.Table[
      Integrate[
       Evaluate[Subscript[T, 2 i] (t)/((xs - t)^2 + 1)], {t, -1,
        1}], {i, 0, n}]

{1 + (1/\[Pi])((0.3024297615770403157 +
        0.*10^-20 \[ImaginaryI]) Subscript[c, 0] Subscript[T,
      0] + (0.3024297615770403157 + 0.*10^-20 \[ImaginaryI]) Subscript[
      c, 1] Subscript[T,
      2] + (0.3024297615770403157 + 0.*10^-20 \[ImaginaryI]) Subscript[
      c, 2] Subscript[T,
      4] + (0.3024297615770403157 + 0.*10^-20 \[ImaginaryI]) Subscript[
      c, 3] Subscript[T,
      6] + (0.3024297615770403157 + 0.*10^-20 \[ImaginaryI]) Subscript[
      c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(0.3075250186147409060 Subscript[c, 0] Subscript[T,
      0] + 0.3075250186147409060 Subscript[c, 1] Subscript[T, 2] +
     0.3075250186147409060 Subscript[c, 2] Subscript[T, 4] +
     0.3075250186147409060 Subscript[c, 3] Subscript[T, 6] +
     0.3075250186147409060 Subscript[c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(0.2963397208662890505 Subscript[c, 0] Subscript[T,
      0] + 0.2963397208662890505 Subscript[c, 1] Subscript[T, 2] +
     0.2963397208662890505 Subscript[c, 2] Subscript[T, 4] +
     0.2963397208662890505 Subscript[c, 3] Subscript[T, 6] +
     0.2963397208662890505 Subscript[c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(0.2001910754770304786 Subscript[c, 0] Subscript[T,
      0] + 0.2001910754770304786 Subscript[c, 1] Subscript[T, 2] +
     0.2001910754770304786 Subscript[c, 2] Subscript[T, 4] +
     0.2001910754770304786 Subscript[c, 3] Subscript[T, 6] +
     0.2001910754770304786 Subscript[c, 4] Subscript[T, 8]), 1,
  1 + (1/\[Pi])(-0.2001910754770304786 Subscript[c, 0] Subscript[T,
      0] - 0.2001910754770304786 Subscript[c, 1] Subscript[T, 2] -
     0.2001910754770304786 Subscript[c, 2] Subscript[T, 4] -
     0.2001910754770304786 Subscript[c, 3] Subscript[T, 6] -
     0.2001910754770304786 Subscript[c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(-0.2963397208662890505 Subscript[c, 0] Subscript[T,
      0] - 0.2963397208662890505 Subscript[c, 1] Subscript[T, 2] -
     0.2963397208662890505 Subscript[c, 2] Subscript[T, 4] -
     0.2963397208662890505 Subscript[c, 3] Subscript[T, 6] -
     0.2963397208662890505 Subscript[c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(-0.3075250186147409060 Subscript[c, 0] Subscript[T,
      0] - 0.3075250186147409060 Subscript[c, 1] Subscript[T, 2] -
     0.3075250186147409060 Subscript[c, 2] Subscript[T, 4] -
     0.3075250186147409060 Subscript[c, 3] Subscript[T, 6] -
     0.3075250186147409060 Subscript[c, 4] Subscript[T, 8]),
  1 + (1/\[Pi])(-0.3024297615770403157 Subscript[c, 0] Subscript[T,
      0] - 0.3024297615770403157 Subscript[c, 1] Subscript[T, 2] -
     0.3024297615770403157 Subscript[c, 2] Subscript[T, 4] -
     0.3024297615770403157 Subscript[c, 3] Subscript[T, 6] -
     0.3024297615770403157 Subscript[c, 4] Subscript[T, 8])}

Bobby

On Thu, 02 Aug 2007 02:48:13 -0500, Angela Kou <Akou at lbl.gov> wrote:

> Hi:
>
> I'm trying to test Paul Abbott's code in his article on integral
> equation solving using Chebyshev polynomials (Mathematica Journal 8(4))
> but Mathematica keeps giving me an error when I get to NIntegrate.  This
> is the code:
> n=4; xs = N[Cos[Range[0, 2 n] Pi/(2 n)], 20];
> cs = Thread[Subscript[c, Range[0, n]]];
> lhs = cs.Table[Subscript[T, 2 i] (xs), {i, 0, n}];
> rhs = 1 + 1/Pi cs.Table[NIntegrate[Evaluate[Subscript[T, 2 i] (t)/((xs -
> t)^2 + 1)], {t, -1, 1}, WorkingPrecision ->20], {i, 0, n}];
>
> the last line of code keeps giving me the error that "NIntegrate::inumr:
> The integrand (t Subscript[T,0])/(1+(1.0000000000000000000-t)^2) has
> evaluated to non-numerical values for all sampling points in the region
> with boundaries {{-1,0}}. >>
>
> I'm not quite sure why this is the case?
>
> Thanks,
> Angela Kou
>
>



-- 

DrMajorBob at bigfoot.com


  • Prev by Date: Re: Density Plot coloring issue
  • Next by Date: Re: Unbearably slow plotting (v6)
  • Previous by thread: Re: Paul Abbott Chebyshev Article
  • Next by thread: Re: Paul Abbott Chebyshev Article