Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS PROGRAM NEEDS TO BE WRITTEN IN THE JULIA LANGUAGE! Write a function to integrate a function fun(x) from A to B using the trapezoidal

THIS PROGRAM NEEDS TO BE WRITTEN IN THE JULIA LANGUAGE!

  1. Write a function to integrate a function fun(x) from A to B using the trapezoidal rule. Your function should have 3 arguments: A, B and N (the number of intervals) so we want . image text in transcribed
  2. for the function use image text in transcribed but this should also be written as a function .. not imbedded in your quadrature function so like: function fun(x) (x-sin(x^3)-exp(-0.01*x))/(x+exp(0.01*x)) end Then use the function in your quadrature function. (recall h = (B-A)/N)

Write a program which prompts the user to enter A, B and N. You may assume the user will enter numbers, but you should check to see that N is an integer. A and B can be either integers or real numbers. Your program should then print out The integral of fun(x) from A to B using N intervals is xxxx (obviously print out the values A,B and N not A B and N

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

Step: 3

blur-text-image

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

Discuss the value of adult learning theory to HRD interventions

Answered: 1 week ago

Question

Conduct a task analysis for a job of your choosing

Answered: 1 week ago