Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I printed this out in Microsoft Word but am running the program in the IDE Dr Racket using the programming language racket. I have finished

I printed this out in Microsoft Word but am running the program in the IDE Dr Racket using the programming language racket. I have finished the differentiation function and have implemented the sum rule, difference rule, product rule, quotient rule and power rule. It works correctly. My goal is to simplify the output (so its easier to read) using the simplify function. I have a good start on this function but need help completing it to satisfy the requirements of 2a and 2b in the third pic. Please only attempt if you are confident in your solution. I am reposting this in hopes that it is easier to read. Thanks for your hard work and I will give a correct solution a big thumbs up.
image text in transcribed
image text in transcribed
image text in transcribed
rlang racket (require racket/trace) (define (diff x expr) differentiation function that produces the derivative of a given function with respect to a given variable (if (not (list? expr)) (if (equal? x expr) 1 0) ;d/dx(x) - 1, d/dx(c)-o (let ( (operation (car expr) expr is (operation u v) (u (cadr expr)) (v (caddr expr))) (case operation ((+) (list'+ (diff xu) (diff x v))) ; d/dx (u+v)-du/dx + dv/dx sum rule (-) (list'-(diff x u) (diff x v));d/dx (u-v) - du/dx-dv/dx difference rule (list u (diff x v) (list v (diff xu))) product rule (U) (list'/ (list '- (list v(diff x u) (list u (diff x v)) (list* v v) quotient rule ((A) (list v (list* (list 'A u (-v 1)) (diff x u))) power rule (trace diff) (diff x 'Vx 2)) ;to test the derivative of x/2 which is 1/2...this is working correctly (diff 'x"U (+3 (. 7 x))(-(* x 2) 1)) to test code on the derivative of (7x+3)/(x^2-1) this is working correctly ;(diff "x"(^ ( test not written yet but will test my ability to differentiate power functions, must find the derivative of 3xAS which is 15xA4 the simplify function is used to simplify the results of the differentiation function in order to make them more readable (define(simplify exp) (if (not list? expr)) expr (let ((operation (car expr)) else part of our if (a (simplify (cadr expr)l) ;recursive call (b (simplity (caddr expr)) recursive call rlang racket (require racket/trace) (define (diff x expr) differentiation function that produces the derivative of a given function with respect to a given variable (if (not (list? expr)) (if (equal? x expr) 1 0) ;d/dx(x) - 1, d/dx(c)-o (let ( (operation (car expr) expr is (operation u v) (u (cadr expr)) (v (caddr expr))) (case operation ((+) (list'+ (diff xu) (diff x v))) ; d/dx (u+v)-du/dx + dv/dx sum rule (-) (list'-(diff x u) (diff x v));d/dx (u-v) - du/dx-dv/dx difference rule (list u (diff x v) (list v (diff xu))) product rule (U) (list'/ (list '- (list v(diff x u) (list u (diff x v)) (list* v v) quotient rule ((A) (list v (list* (list 'A u (-v 1)) (diff x u))) power rule (trace diff) (diff x 'Vx 2)) ;to test the derivative of x/2 which is 1/2...this is working correctly (diff 'x"U (+3 (. 7 x))(-(* x 2) 1)) to test code on the derivative of (7x+3)/(x^2-1) this is working correctly ;(diff "x"(^ ( test not written yet but will test my ability to differentiate power functions, must find the derivative of 3xAS which is 15xA4 the simplify function is used to simplify the results of the differentiation function in order to make them more readable (define(simplify exp) (if (not list? expr)) expr (let ((operation (car expr)) else part of our if (a (simplify (cadr expr)l) ;recursive call (b (simplity (caddr expr)) recursive call

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

How will your strategy receive approval?

Answered: 1 week ago

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago

Question

Question Can employees make contributions to a profit sharing plan?

Answered: 1 week ago