Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8833891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:53:31+00:00 2026-06-14T08:53:31+00:00

This shouldn’t be this hard, but I’m stuck. We have a simple assignment where

  • 0

This shouldn’t be this hard, but I’m stuck. We have a simple assignment where we’re writing how to take the derivative of a function.

(define (derive exp var)
(cond ((number? exp) 0)
    ((variable? exp) (if (same-variable? exp var) 1 0))
    ((sum? exp) (derive-sum exp var))
    ((product? exp) (derive-product exp var))
    ((exponentiation? exp) (derive-exponentiation exp var))
    (else 'Error)))

But for the exponentiation, it needs to return true if I do have an exponential function. I’m just not entirely sure how to write it. So far I’ve just got something like this

(define (make-exponentiation base exponent)
   (cons base exponent)

(define (base exponentiation)
   (car exponentiation)

(define (exponent exponentiation)
   'cdr exponentiation)

(define (exponentiation? exp)
   'YourCodeHere)

(define (derive-exponentiation exp var)
   (* var (make-exponentiation exp (var-1)) (derive exp))

I’m not exactly sure what I’m checking about car and cdr. The whole thing is just a bit confusing. That’s not the given code. I guess car and cdr are just kinda like placeholders at the moment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:53:32+00:00Added an answer on June 14, 2026 at 8:53 am

    It’s quite some time, since I’ve done scheme. I’m more familiar with emacs lisp. So take with a grain of salt:

    (define (make-exponentiation base exponent)
       (list '^ base exponent))
    
    (define (base exponentiation)
       (car (cdr exponentiation)))
    
    (define (exponent exponentiation)
       (car (cdr (cdr exponentiation))))
    
    (define (exponentiation? exp)
       (equal? (car exp) '^))
    
    (define (derive-exponentiation exp var)
       (let ((b (base exp))
             (e (exponent exp)))
       (make-product e (make-exponentiation b (- e 1))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this shouldn't be that hard, but I couldn't find the answer on
This shouldn't be hard...I have a menu and some content wrapped in a centered,
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I know this shouldn't be as hard as I have found it to be,
I have information stored in a database (actually a content repository but this shouldn't
I'm pretty sure this shouldn't be as hard as it is. I have a
This shouldn't be so hard but I just can't seem to get this to
I have to extend an existing program (Java-based, but this shouldn't count). This program
Surely, this shouldn't be so hard? I have a <select> , which has, of
Hopefully this shouldn't be too complicated....but I have the following character string in x

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.