From: ·······@gmail.com
Subject: cosx - sinx + 3x2
Date: 
Message-ID: <1136130082.085214.39560@g49g2000cwa.googlegroups.com>
How can i write this function in drscheme.
cosx - sinx + 3x2

From: John
Subject: Re: cosx - sinx + 3x2
Date: 
Message-ID: <D7adnRGZoqK2vyXeRVn-uw@comcast.com>
·······@gmail.com wrote:

> How can i write this function in drscheme.
> cosx - sinx + 3x2

which do you mean?

cos(x) - sin(x) + 6
cos(x) - 2*sin(x+3)
cos(x) - sin(2*(x+3))
cos(x) - sin(x+6)
.
.
.
From: GB
Subject: Re: cosx - sinx + 3x2
Date: 
Message-ID: <%zWtf.28566$9G.2216@dukeread10>
·······@gmail.com wrote:
> How can i write this function in drscheme.
> cosx - sinx + 3x2
> 

I don't know about scheme, but in common lisp it is

    (+ (- (cos x) (sin x)) (* 3 x x))

assuming you mean (using BASIC syntax)

    cos(x) - sin(x) + 3*x^2

Gregg
From: Marco Antoniotti
Subject: Re: cosx - sinx + 3x2
Date: 
Message-ID: <1136240484.723716.29270@z14g2000cwz.googlegroups.com>
GB wrote:
> ·······@gmail.com wrote:
> > How can i write this function in drscheme.
> > cosx - sinx + 3x2
> >
>
> I don't know about scheme, but in common lisp it is
>
>     (+ (- (cos x) (sin x)) (* 3 x x))
>
> assuming you mean (using BASIC syntax)
>
>     cos(x) - sin(x) + 3*x^2

Which in Common Lisp is also :) (with the INFIX package)

     #I(cos(x) - sin(x) + 3*x^2)

Cheers
--
Marco
From: Harald Hanche-Olsen
Subject: Re: cosx - sinx + 3x2
Date: 
Message-ID: <pcomzifzxtb.fsf@shuttle.math.ntnu.no>
+ ·······@gmail.com:

| How can i write this function in drscheme.
| cosx - sinx + 3x2

Here's a step by step instruction.

1. Learn the basics of the language.
2. Translate your expression into the target language.
3. Test your solution.  If succesful, quit.  Otherwise, return to 1.
4. Write to comp.lang.scheme (/not( comp.lang.lisp), explaining what
   you wrote, what you expected to happen, and what really did.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow