Evaluate if the followings are Cauchy sequences or not.
(a) an= (-1)n
(b) an= (-1)n/n
(c) an = n/(n+1)
(d) an = (cos n)/n
In: Advanced Math
Solve using Laplace and Inverse Laplace Transforms.
Y’’’-y’’-4y’+4y=0
y(0)=1 y’(0)=9 y’’(0)=1
In: Advanced Math
In: Advanced Math
Question1 (50 pts): LU Factorization Code for Square Matrices without Row Exchange
I want you to write an LU decomposition program in Matlab for square matrices (n×n) where row exchange is not necessary (that is no pivot is 0). Here are some hints and requirements for your matlab code.
You should write comments for every procedure. Make sure that your code is well indexed (see below). Otherwise it will be hard for me to follow and bad programming practice for you.
This should be a Matlab Function called slu (don’t name it lu because matlab already has a program called lu):
Your program should be a function in Matlab. So your filename should be slu.m (.m is standard for matlab scripts or functions). In order to be a function you should start with
function [L,U]=slu=slu(A)
where A is the input square matrix. Always write what a program does using matlab
comment (%) so that it
First step is to determine the size of the matrix. Use size command to obtain the size of a matrix.
[n,m]=size(A)
Then if n is not equal to m end the program. If n=m continue
So your code should look like this
function [L,U]=slu=slu(A)
%LU factorization of square matrices %with no row exchange
[n,n]=size(A) %determine the size of A Tol=1.e-6 %tolerance level
for zero
for k=1:n %loop over pivots of A if(A(k,k) < tol) %check for pivot
disp(‘cannot proceed without row exchange’) end %cannot proceed without row exchange L(k,k)=1;
for i=k+1:n %loop over each line to determine lik determine lik
for j=k:n start from row k+1 and col. k remove (pivot row×Lik) from each row of A
end
for j=k:n
write the pivot line to Ubecause pivot is fixed
end end
due 23/10/2019
Question2(50 pts): Solving matrix equation using LU
Next step is to solve the equation using substitution. So you will need to do the standard procedure for LU. First step is to solve Ly=b. And next is to solve Ux=y. For Ly=b you need to go from top to bottom, but for Ux=y you need to go from bottom xn to x1. This function will use slu function so you need to be on the same directory. Name your file “luslv.m”.
Function x=luslv(A,b)
%Solve Ax=b using L&U from slu(A) %No row exchanges
[L,U]=slu(A) %first decompose A to LU
First do a for loop from k=1:n and another for loop for j=1:k-1 and sum the contributions to b(k) from yk-1, yk-2...y1.
Then y(k)=b(k)-s %forward elim. To solve Ly=b
Then solve Ux=y. You need to start from n and go to 1. In matlab you can do it
for k=n:-1:1 %go backwards from n to 1
Sum up contributions from xk+1, xk+2...xn.
Remove the sum from y(k) and divide by the pivot
In: Advanced Math
In: Advanced Math
Consider the following problem. max ? 0.5?1 + 2.5?2 + ?3 subject to ?1 + 2?2 + 3?3 ≤ 8 ?1, ?2, ?3 ∈ ℤ + ∪ {0} Solve the problem by dynamic programming. Show each step clearly.
In: Advanced Math
its solve once but I need different answer please
a quick please I'm in trouble
In: Advanced Math
2) Let v, w, and x be vectors in Rn.
a) If v is the zero vector, what geometric object represents all
linear
combinations of v?
b) Same question as a), except now for a nonzero v.
c) Same question as a) except now for nonzero vectors v and w (be
care-
ful!).
d) Same question as a) except now for nonzero vectors v, w, and x
(be
extra careful!).
In: Advanced Math
Report on this topic Design filtering
Content included...
Abstract
Introduction
Principles
Code design
Result and discussion
Conclusion
Reference
In: Advanced Math
i. Identify the conic whose equation is 11x2 + 24 xy + 4y2 − 15 = 0 by rotating the axes to place the conic in standard position.
ii. Find the angle θ through which you rotated the xy-axes in part (a).
In: Advanced Math
In: Advanced Math
Write a Matlab script-file probl1.m to execute the requested commands (as much as possible) in the exercises below. Increase N a number of times according to N = 4, 8, 16, 32, 64, 128, . . . (1) Determine for each N the (exact) error. (2) Determine for N ≥ 16 also the convergence ratio q(h/2).
This script should be based on a function-file trap.m (trapezoidal integration) as follows:
function [totarea] = trap(N)
format long;
a = 0; b = 1/2; h = (b-a)/N;
x = a:h:b; totarea = 0;
for i = 1:N
xl = x(i);
xr = x(i+1);
fxl = myfunct(xl);
fxr = myfunct(xr);
locarea = (h/2)*(fxl+fxr);
totarea = totarea + locarea;
end
end
You can refer to the integral as myfunct(). The interval is [0,1/2].
In: Advanced Math
A field is a commutative ring with unity in which every nonzero element is a unit.
Question: Show that Z_5 under addition and multiplication mod 5 is a field. (state the operations, identities, inverses)
In: Advanced Math
Obtain an estimate for the value of e by approximating the solution of the following initial value problem at t = 1
y'=y y0=1
Use a step size of 0.25. Apply Euler’s Method, the Midpoint Method, and the Improved Euler’s Method in order to approximate the solution to this problem. Calculate the absolute relative true percent error using seven significant figures. Calculate this error for each method and only for the last iteration.
In: Advanced Math
Which of the following statements is/are true?
1) If a matrix has 0 as an eigenvalue, then it is not invertible.
2) A matrix with its entries as real numbers cannot have a non-real eigenvalue.
3) Any nonzero vector will serve as an eigenvector for the identity matrix.
In: Advanced Math