SlideShare a Scribd company logo
AMTH250                                                          Assignment 6
                       Due: 24th September, 2012



Question 1 [3 marks]
   Evaluate the following integrals using quad:
                                 ∞
                                        x3
                 (a) I1 =                    dx
                             0        ex − 1
                                 1
                 (b) I2 =            ln(1 + x) ln(1 − x) dx
                             −1
                              π
                 (c) I3 =            (tan(sin x) − sin(tan x)) dx
                             0

Do you think the results are reliable?
Question 2 [3 marks]
   The intensity of diffracted light near a straight edge is determined by
the Fresnel integrals
                                            x
                                                      πt2
                         C(x) =                 cos         dt
                                        0              2

and
                                            x
                                                      πt2
                         S(x) =                 sin         dt
                                        0              2

Use quad to evaluate these integrals for enough values of x to draw smooth
plots of C(x) and S(x) over the range −10 ≤ x ≤ 10. Also plot C(x) against
S(x) — the result is the Cornu or Euler spiral.
Question 3 [3 marks]
   Use Monte-Carlo methods to

 (a) Estimate the volume of the ellipsoid

                                                y2   z2
                                     x2 +          +    ≤ 1.
                                                4    16




                                                1
(b) Estimate the double integral
                                         √
                                           2  2
                                       e− x +y dx dy
                                   Ω

     over the semicircular region Ω defined by

                                x2 + y 2 ≤ 1,   x ≥ 0.


Question 4 [3 marks]
  The initial value problem
                          dy
                             = −2ty,        y(0) = 1
                          dt
has the solution
                                            2
                                  y(t) = e−t
Apply Euler’s method with various step-sizes h to this problem.

 (a) Solve the initial value problem on the interval [0, 1]. As a measure
     of error, compare the computed and exact values at t = 1. Plot and
     characterize the error as a function of the step-size h.

 (b) The exact solution decays to 0 as t → ∞. A numerical method for
     this problem is unstable if it does not decay to 0 as t → ∞. Determine
     the range of step-sizes h for which Euler’s method is unstable for this
     problem.

Question 5 [4 marks]
  The system of differential equations
                          dy1
                                 = σ(y2 − y1 )
                           dt
                          dy2
                                 = ry1 − y2 − y1 y3
                           dt
                          dy3
                                 = y1 y2 − by3
                           dt
was used by Lorenz as a crude model of atmospheric circulation.
    Take σ = 10, b = 8/3 and r = 28 and initial values y1 (0) = 0, y2 (0) = 1
and y3 (0) = 0 and use lsode to solve the differential equation from t = 0 to
t = 100. Plot (a) each component individually, (b) phase plots of each pair
of components, and (c) a 3D plot of the curve (y1 (t), y2 (t), y3 (t)).
    Now experiment by changing the initial conditions by a tiny amount. De-
scribe how the graphs above and the final values (y1 (100), y2 (100), y3 (100))
change.

                                        2
Notes on the Assignment

Question 2
You will need a for loop to generate the vectors of values of C(x) and S(x).
A step of 0.01 gives reasonable results, so try something like
x = -10:0.01:10;
.....
for i = 1:length(x)
  % evaluate C(x(i)) & S(x(i))
end

Questions 3
It is easy to get these wrong. Some things to watch out for:
  1. First identify the range of the random numbers for each dimension,
     e.g. y ∈ [0, 2].
  2. Use rand correctly, e.g. for y ∈ [0, 2] use 2*rand(1,1) not rand(0,2).
  3. Make sure you account for the volume of the region in which you
     generate the random numbers.
If in doubt, study the examples in the notes carefully making sure you
understand each step in the computation. Beware that the lines
    x = rand(1,4);    % x = point in unit cube
    if (norm(x) <= 1) % point x lies in sphere
in the example of §1.6.3 are quite specific to that particular problem.

Questions 4
This is the same differential equation that was used as an example in the
notes.
   (a) Try step sizes h = 1/2, 1/4, 1/8, . . . . You will need a for loop to
generate the data. Start with something like
N = 16;
h = zeros(1,N);
y1 = zeros(1,N);   % values of y at t=1
for k = 1:N
  hk = 2^-k;
  h(k) = hk;
  y =euler(f, 0, 1, hk, 2^k); % 2^k steps needed to reach t=1
  y1(k) = y(end);             % y(end) is the last element of y
end

                                     3
(b) The example at the top of p25 of the notes shows Euler’s method is
unstable for h = 1.

Question 5
  1. See the example in the notes on the Lotka-Volterra equations for how
     to solve this sort of problem in Octave.

  2. See §3.4 of the Octave notes for plotting 3D curves.

  3. The initial values are [0 1 0]. For a small change in initial values,
     try adding 1e-10*randn(1,3) for example.




                                    4

More Related Content

What's hot

Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSEAU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
Thiyagarajan G
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
Luckshay Batra
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.Mohd Arif
 
Integration
IntegrationIntegration
Integrationlecturer
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9
Yasser Ahmed
 
Lec05 circle ellipse
Lec05 circle ellipseLec05 circle ellipse
Lec05 circle ellipse
Maaz Rizwan
 
Lab lecture 1 line_algo
Lab lecture 1 line_algoLab lecture 1 line_algo
Lab lecture 1 line_algo
simpleok
 
Image Processing 3
Image Processing 3Image Processing 3
Image Processing 3jainatin
 
Cs580
Cs580Cs580
Differentiation jan 21, 2014
Differentiation jan 21, 2014Differentiation jan 21, 2014
Differentiation jan 21, 2014
Mohammed Ahmed
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.Mohd Arif
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference Formula
Jas Singh Bhasin
 

What's hot (20)

Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSEAU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
 
Sect1 4
Sect1 4Sect1 4
Sect1 4
 
Integration
IntegrationIntegration
Integration
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9
 
Lec05 circle ellipse
Lec05 circle ellipseLec05 circle ellipse
Lec05 circle ellipse
 
Ch02 2
Ch02 2Ch02 2
Ch02 2
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithm
 
Line circle draw
Line circle drawLine circle draw
Line circle draw
 
Lab lecture 1 line_algo
Lab lecture 1 line_algoLab lecture 1 line_algo
Lab lecture 1 line_algo
 
Image Processing 3
Image Processing 3Image Processing 3
Image Processing 3
 
Cs580
Cs580Cs580
Cs580
 
Day 01
Day 01Day 01
Day 01
 
Differentiation jan 21, 2014
Differentiation jan 21, 2014Differentiation jan 21, 2014
Differentiation jan 21, 2014
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference Formula
 

Similar to Assignment6

Engr 213 final 2009
Engr 213 final 2009Engr 213 final 2009
Engr 213 final 2009akabaka12
 
Emat 213 midterm 1 winter 2006
Emat 213 midterm 1 winter 2006Emat 213 midterm 1 winter 2006
Emat 213 midterm 1 winter 2006akabaka12
 
Review for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docxReview for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docx
joellemurphey
 
Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment Help
Edu Assignment Help
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)asghar123456
 
Maths assignment
Maths assignmentMaths assignment
Maths assignmentNtshima
 
Double integration
Double integrationDouble integration
Double integration
Abhishek N Nair
 
Online Maths Assignment Help
Online Maths Assignment HelpOnline Maths Assignment Help
Online Maths Assignment Help
Math Homework Solver
 
Online Maths Assignment Help
Online Maths Assignment HelpOnline Maths Assignment Help
Online Maths Assignment Help
Maths Assignment Help
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
OlooPundit
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
CrackDSE
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
EssaAlMadhagi
 
Engr 213 midterm 2b sol 2010
Engr 213 midterm 2b sol 2010Engr 213 midterm 2b sol 2010
Engr 213 midterm 2b sol 2010akabaka12
 
GATE Mathematics Paper-2000
GATE Mathematics Paper-2000GATE Mathematics Paper-2000
GATE Mathematics Paper-2000
Dips Academy
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Binomial theorem for any index
Binomial theorem for any indexBinomial theorem for any index
Binomial theorem for any index
indu psthakur
 
Engr 213 midterm 2a sol 2010
Engr 213 midterm 2a sol 2010Engr 213 midterm 2a sol 2010
Engr 213 midterm 2a sol 2010akabaka12
 
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
CrackDSE
 

Similar to Assignment6 (20)

Engr 213 final 2009
Engr 213 final 2009Engr 213 final 2009
Engr 213 final 2009
 
Emat 213 midterm 1 winter 2006
Emat 213 midterm 1 winter 2006Emat 213 midterm 1 winter 2006
Emat 213 midterm 1 winter 2006
 
Review for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docxReview for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docx
 
Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment Help
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Maths assignment
Maths assignmentMaths assignment
Maths assignment
 
Double integration
Double integrationDouble integration
Double integration
 
Online Maths Assignment Help
Online Maths Assignment HelpOnline Maths Assignment Help
Online Maths Assignment Help
 
Online Maths Assignment Help
Online Maths Assignment HelpOnline Maths Assignment Help
Online Maths Assignment Help
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
 
Assignment5
Assignment5Assignment5
Assignment5
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
 
Chapter 3 (maths 3)
Chapter 3 (maths 3)Chapter 3 (maths 3)
Chapter 3 (maths 3)
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
 
Engr 213 midterm 2b sol 2010
Engr 213 midterm 2b sol 2010Engr 213 midterm 2b sol 2010
Engr 213 midterm 2b sol 2010
 
GATE Mathematics Paper-2000
GATE Mathematics Paper-2000GATE Mathematics Paper-2000
GATE Mathematics Paper-2000
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Binomial theorem for any index
Binomial theorem for any indexBinomial theorem for any index
Binomial theorem for any index
 
Engr 213 midterm 2a sol 2010
Engr 213 midterm 2a sol 2010Engr 213 midterm 2a sol 2010
Engr 213 midterm 2a sol 2010
 
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
 

More from asghar123456

Answers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsAnswers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsasghar123456
 
Answers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsAnswers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsasghar123456
 
Answers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsAnswers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsasghar123456
 
Answers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsAnswers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsasghar123456
 
assignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsassignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsasghar123456
 
Buckling test engt110
Buckling test engt110Buckling test engt110
Buckling test engt110asghar123456
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)asghar123456
 
Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)asghar123456
 

More from asghar123456 (9)

Answers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsAnswers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanics
 
Answers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsAnswers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanics
 
Answers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsAnswers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanics
 
Answers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsAnswers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanics
 
assignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsassignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanics
 
Buckling test engt110
Buckling test engt110Buckling test engt110
Buckling test engt110
 
Assignment4
Assignment4Assignment4
Assignment4
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)
 
Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 

Assignment6

  • 1. AMTH250 Assignment 6 Due: 24th September, 2012 Question 1 [3 marks] Evaluate the following integrals using quad: ∞ x3 (a) I1 = dx 0 ex − 1 1 (b) I2 = ln(1 + x) ln(1 − x) dx −1 π (c) I3 = (tan(sin x) − sin(tan x)) dx 0 Do you think the results are reliable? Question 2 [3 marks] The intensity of diffracted light near a straight edge is determined by the Fresnel integrals x πt2 C(x) = cos dt 0 2 and x πt2 S(x) = sin dt 0 2 Use quad to evaluate these integrals for enough values of x to draw smooth plots of C(x) and S(x) over the range −10 ≤ x ≤ 10. Also plot C(x) against S(x) — the result is the Cornu or Euler spiral. Question 3 [3 marks] Use Monte-Carlo methods to (a) Estimate the volume of the ellipsoid y2 z2 x2 + + ≤ 1. 4 16 1
  • 2. (b) Estimate the double integral √ 2 2 e− x +y dx dy Ω over the semicircular region Ω defined by x2 + y 2 ≤ 1, x ≥ 0. Question 4 [3 marks] The initial value problem dy = −2ty, y(0) = 1 dt has the solution 2 y(t) = e−t Apply Euler’s method with various step-sizes h to this problem. (a) Solve the initial value problem on the interval [0, 1]. As a measure of error, compare the computed and exact values at t = 1. Plot and characterize the error as a function of the step-size h. (b) The exact solution decays to 0 as t → ∞. A numerical method for this problem is unstable if it does not decay to 0 as t → ∞. Determine the range of step-sizes h for which Euler’s method is unstable for this problem. Question 5 [4 marks] The system of differential equations dy1 = σ(y2 − y1 ) dt dy2 = ry1 − y2 − y1 y3 dt dy3 = y1 y2 − by3 dt was used by Lorenz as a crude model of atmospheric circulation. Take σ = 10, b = 8/3 and r = 28 and initial values y1 (0) = 0, y2 (0) = 1 and y3 (0) = 0 and use lsode to solve the differential equation from t = 0 to t = 100. Plot (a) each component individually, (b) phase plots of each pair of components, and (c) a 3D plot of the curve (y1 (t), y2 (t), y3 (t)). Now experiment by changing the initial conditions by a tiny amount. De- scribe how the graphs above and the final values (y1 (100), y2 (100), y3 (100)) change. 2
  • 3. Notes on the Assignment Question 2 You will need a for loop to generate the vectors of values of C(x) and S(x). A step of 0.01 gives reasonable results, so try something like x = -10:0.01:10; ..... for i = 1:length(x) % evaluate C(x(i)) & S(x(i)) end Questions 3 It is easy to get these wrong. Some things to watch out for: 1. First identify the range of the random numbers for each dimension, e.g. y ∈ [0, 2]. 2. Use rand correctly, e.g. for y ∈ [0, 2] use 2*rand(1,1) not rand(0,2). 3. Make sure you account for the volume of the region in which you generate the random numbers. If in doubt, study the examples in the notes carefully making sure you understand each step in the computation. Beware that the lines x = rand(1,4); % x = point in unit cube if (norm(x) <= 1) % point x lies in sphere in the example of §1.6.3 are quite specific to that particular problem. Questions 4 This is the same differential equation that was used as an example in the notes. (a) Try step sizes h = 1/2, 1/4, 1/8, . . . . You will need a for loop to generate the data. Start with something like N = 16; h = zeros(1,N); y1 = zeros(1,N); % values of y at t=1 for k = 1:N hk = 2^-k; h(k) = hk; y =euler(f, 0, 1, hk, 2^k); % 2^k steps needed to reach t=1 y1(k) = y(end); % y(end) is the last element of y end 3
  • 4. (b) The example at the top of p25 of the notes shows Euler’s method is unstable for h = 1. Question 5 1. See the example in the notes on the Lotka-Volterra equations for how to solve this sort of problem in Octave. 2. See §3.4 of the Octave notes for plotting 3D curves. 3. The initial values are [0 1 0]. For a small change in initial values, try adding 1e-10*randn(1,3) for example. 4