Problem 1 (b)
Solve the equation for 0<t<=7 using the explicit Euler scheme with the following time steps: h = 0,2; 0,05; 0,025; 0,006. clear;clc a=0;b=7;ya=1; h1=0.2; h2=0.05; h3=0.025; h4=0.006; f=@(t,y) -0.2*y-2*cos(2*t)*y^2; E1 =euler(f,a,b,ya,h1); E2
Problem 3 Part (a)
Table of Contents
. 1 (1) Explicit Euler . 1 (2) CN . 2 (3) RK2 . 3 (4) RK4 . 4
The system is second order and have pure imaginary eigenvaluves clear;clc theta0=10/360*2*pi; a=0;b=6;g=9.81;l=0.6; h1=0.15;h2=0.5;h3=1; t=a:0.001:b; theta=
MAE 290B - Homework # 1 Numerical Methods in Science and Engineering
Prof. Alison Marsden Due date: Thurs Jan 20, 2011
Problem 1 - Euler Method. A physical phenomena is governed by the linear dierential equation dv = 0.2v 2 cos(2t)v 2 dt subject to the in
Problem 2 - Apollo Orbit
Table of Contents
. 1 (a) . 1 (b) . 2 (c) . 2 (d) . 3
clear;clc; miu=1/82.45;mius=1-miu;
(a)
From this part, we can see the two orbits of different time span are the same. So we can say the period T=6.19216933 options = odeset('Re
MAE 290b Numerical Methods HW6
Qiyun Zhao March 7, 2011
MAE290b
HW6
Qiyun Zhao
Problem 1
(a) Solve the problem using an explicit method
(1) Use EE and nite dierence un ,j un 1,j un +1 un 1 un ,j 2un + un 1,j un +1 2un + un 1 dui,j i+1 i i,j i,j i+1 i,j i
MAE 290B - Homework # 5 Numerical Methods in Science and Engineering
Prof. Alison Marsden Due date: Tues March 1, 2011
Problem 1 - Eigenvalues of a Tridiagonal Matrix. Let T be an (N 1) (N 1) tridiagonal matrix, B [a, b, c]. Let D(N 1) be the determinant
Homework 2 Solutions
MAE 290B Winter 2016
Iman Gohari
February 7, 2017
Problem1
Part (a)
Comparing the amplification factor of RK2 and EE to the exact solution (exact = 1+h+(h)2/ 2+
(h)3 /6 + .,) yields:
EE = 1 + h + O(h2 ),
RK2 = 1 + h + (h)2 /2 + O(h3 )
MAE 290B, Winter 2016
Homework 2
Due Thursday, Feb. 9, in class
1. The ODE
y 0 = f (y, t)
(1)
is numerically solved for a real function f (y, t). Evaluations of f (y, t) dominate the computational cost of the method. Method 1 is RK2 with a step of h and m
MAE 290B, Winter 2017
Homework 3
Due Thursday, March. 2, in class
1. The linear diffusion equation
T
2T
= 2 ,
(1)
t
x
with > 0 is to be solved. The forward Euler method is used for time integration and a fourthorder, central approximation is used for the
MAE 290B, Winter 2017
Homework 4
Due TUESDAY, March 14, in class
1. The Crank-Nicolson method with centered 2nd order approximation for the spatial derivative is
used to solve the unsteady diffusion equation,
Tt = Txx .
a) Perform an accuracy and stabilit
MAE 290B, Winter 2016
Homework 4
Due Thursday, March 10, in class
NO programming in this assignment!
1. The Crank-Nicolson method with centered space approximation for the spatial derivative is used to
solve the unsteady diffusion equation,
Tt = Txx .
sh
MAE 290B, Winter 2016
Homework 1
Due Thursday, Jan. 21, in class
1. A function f (x) is known at points xi , i = 1, 2, . . . , n.
a) Obtain a second-order accurate central approximation to f 00 (x) at xi using the Taylor-series method.
b) The function at
MAE 290B, Winter 2016
Homework 2
Due Thursday, Feb. 4, in class
1.
Apply the RK4 scheme to a system of ODEs developed by Otto Rossler which is found to
be useful in modeling equilibrium in chemical reactions. These differential equations define a
continuo
Homework 3 Solutions
MAE 290B Winter 2016
March 7, 2016
Problem 1
Part (a)
Stating with the advection-diffusion equation for temperature
Tt + uTx = Txx ,
(1)
we can get the exact solution by assuming a solution in form of T = (t)eikx . Substituting in Eq.
Homework 4 Solutions
MAE 290B Winter 2016
March 7, 2016
Problem 2
(a) Gauss-Seidel method: Maximum eigen value is given by,
1
max = (cos(/M ) + cos(/N )2 .
4
Here M=32 and N=32 , which gives the maximum eigen value max 0.9904.
Number of iterations require
Homework 2 Solutions
MAE 290B Winter 2016
February 8, 2016
Problem 1
Part (a)
Since the exact solution is unknown, the numerical solution of the RK4 method is computed for
several values of h and the converged solution with the smallest h is taken as the
Homework 1 Solutions
MAE 290B Winter 2016
February 2, 2016
1
EE
CN
Exact Solution
Initial time solution for DELTA t = 0.1 s
y(t)
2
0
2
0
10
20
30
40
50
60
50
60
50
60
50
60
Initial time solution for DELTA t = 1.0 s
y(t)
2
0
2
0
10
20
30
40
Initial time so
MAE 290B, Winter 2016
Homework 2
Due Thursday, Feb. 9, in class
1. The ODE
y 0 = f (y, t)
(1)
is numerically solved for a real function f (y, t). Evaluations of f (y, t) dominate the computational cost of the method. Method 1 is RK2 with a step of h and m
MAE 290B, Winter 2017
Homework 1
Due Thursday, Jan. 26, in class
1. A function f (x) is known at equispaced points xi , i = 1, 2, . . . , n with spacing h.
a) Obtain a central approximation to f 0 (x) at xi that is fourth-order accurate.
b) Obtain a leftw
Homework 1 Solutions
MAE 290B Winter 2017
Iman Gohari
January 30, 2017
Problem1
Part (a)
To find a 4th order central finite-difference approximation of f 0 (x), the following relation is considered (using 5-point stencil):
afi2 + bfi1 + cfi + dfi+1 + efi+
MAE 290B, Winter 2016
Homework 4
Due Thursday, March 10, in class
NO programming in this assignment!
1. The Crank-Nicolson method with centered space approximation for the spatial derivative is used to
solve the unsteady diffusion equation,
Tt = Txx .
a)