- ;; mht created on Nov 9, 2011
-
-
;; equation1 : number -> boolean
-
;; to determine whether x is a solution for x^2+2*x+1=0
-
(define (equation1 x)
-
(= (+ (* x x) (* 2 x) 1) 0))
-
-
; test
-
(equation1 1)
-
-
;; equation2 : number -> boolean
-
;; to determine whether x is a solution for 4n+1=62
-
(define (equation2 x)
-
(= (+ (* 4 x) 1) 62))
-
-
(equation2 14)
-
-
;; equation3 : number -> boolean
-
;; to determine whether x is a solution for 2*n^2=102
-
(define (equation3 x)
-
(= (* 2 (* x x)) 102))
-
(equation3 14)
-
-
;; equation4 : number -> boolean
-
;; to determine whether x is a solution for 4*n^2+6n+2=462
-
(define (equation4 x)
-
(= (+ (* 4 (* x x)) (* 6 x) 2) 462))
- (equation4 10)