Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Introduction to Computational Methods: Monte Carlo Simulations & Maclaurin Series Homework, Assignments of Engineering

A homework assignment for the course 'introduction to computational methods' (aoe/esm 2074), due on september 13, 2001. The assignment includes tasks related to monte carlo simulations using matlab, such as generating random numbers, computing fractions, and creating semilogarithmic plots. Additionally, students are required to write a script for evaluating the maclaurin series approximation of tan(x) and compare the results with the matlab tan function.

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-p0x
koofers-user-p0x 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download Introduction to Computational Methods: Monte Carlo Simulations & Maclaurin Series Homework and more Assignments Engineering in PDF only on Docsity! AOE/ESM 2074 Introduction to Computational Methods H.W. Set 3 due 13 September 2001 1. Read Chapter 4 in the Chapman text. 2. Write a Matlab script that will ask the user for a number 0 < x < 1, then assemble a large vector of random numbers from a uniform distribution on [0, 1] and compute what fraction of the 10,000 samples lies in the interval [0, x]. Generate a suitably labeled semilogarithmic plot of how this fraction varies for x = .5 as the sample size goes from 100 to 100,000. Turn in a listing of your command script and the plot. 3. The basic idea of Monte Carlo methods is to use a random procedure to simplify a calculation. Use the procedure described in class to produce an estimate for the definite integral I = ∫ 1 0 exp(−x2) (1 + x2) dx Turn in a listing of your command script and a listing of the diary from exercising the code. 4. Write a Matlab script to evaluate the Maclaurin series approximation of tan(x), the tangent of x. The code should ask the user to specify a value of x and a tolerance and then evaluate the partial sum until the next term (the first one not included) is less than the specified value. Compare the series approximation to the value provided the Matlab tan function. Turn in a listing of your command script and a listingof the diary from exercising the code for x = 0.2, tol = .0001. 1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved