MathGroup Archive 1996

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

Search the Archive

ts ts ts


Hi there.

Does anybody know why Mathematica gets choked trying to solve
this simple equation? (seems like an easy way to calculate Fourier series up to n=3)

---------------------------------
x1=3
y1=3
x2=4
y2=4
x3=5
y3=5
x4=10
y4=-20
x5=11
y5=30
x6=12
y6=-30
x7=18
y7=0

Solve[{
    y1==a0+a1 Cos[x1]+b1 Sin[x1]+a2 Cos[2 x1]+b2 Sin[2 x1]+a3 Cos[3 x1]+
        b3 Sin[3 x1], 
    y2==a0+a1 Cos[x2]+b1 Sin[x2]+a2 Cos[2 x2]+b2 Sin[2 x2]+a3 Cos[3 x2]+
        b3 Sin[3 x2],
    y3==a0+a1 Cos[x3]+b1 Sin[x3]+a2 Cos[2 x3]+b2 Sin[2 x3]+a3 Cos[3 x3]+
        b3 Sin[3 x3],
    y4==a0+a1 Cos[x4]+b1 Sin[x4]+a2 Cos[2 x4]+b2 Sin[2 x4]+a3 Cos[3 x4]+
        b3 Sin[3 x4],
    y5==a0+a1 Cos[x5]+b1 Sin[x5]+a2 Cos[2 x5]+b2 Sin[2 x5]+a3 Cos[3 x5]+
        b3 Sin[3 x5],
    y6==a0+a1 Cos[x6]+b1 Sin[x6]+a2 Cos[2 x6]+b2 Sin[2 x6]+a3 Cos[3 x6]+
        b3 Sin[3 x6],
    y7==a0+a1 Cos[x7]+b1 Sin[x7]+a2 Cos[2 x7]+b2 Sin[2 x7]+a3 Cos[3 x7]+
        b3 Sin[3 x7]}, {a0, a1, b1, a2, b2, a3, b3}]
---------------------------------

Might there be a more straightforward solution? The sinus and cosinus terms evidently are fixed, so....

Gratitude beyond expression,

--
Arthur Fritzsche             |                PowerPC advocate since 11/04/79
afritzse at limmat.ch           |    OS/2 forever! UNIX forever! Win 95 forever!
                        ---({|})---
afritzse at pax.eunet.ch        |             Power Mac 8100/80: In Need of UNIX
CIS: 100031,1752             |      on Grand Friesenberg, Zurich, Switzerland
   *** Drop by at http://www.limmat.ch/afritzse/ -- MARVELLOUS nature! ***




  • Prev by Date: Re: help!! Plot3D of ellipsoid
  • Next by Date: Re: boundary value problems
  • Previous by thread: queries on new 3.0?
  • Next by thread: Re: ts ts ts