;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 4.2.3) (read-case-sensitive #t) (teachpacks ((lib "convert.ss" "teachpack" "htdp"))) (htdp-settings #8(#t constructor repeating-decimal #f #t none #f ((lib "convert.ss" "teachpack" "htdp")))))
;; equation1 : number -> boolean
;; See if n is a solution to 4*n + 2 = 62
(define (equation1 n)
(= (+ (* 4 n) 2) 62))
;; equation2 : number -> boolean
;; See if n is a solution to 2*n^2 = 102
(define (equation2 n)
(= (* 2 (sqr n)) 102))
;; equation3 : number -> boolean
;; Test if n is a solution to 4*n^2 + 6*n + 2 = 462
(define (equation3 n)
(= (+
(* 4 (sqr n))
(* 6 n)
2)
462))