程序代写代做代考 答案1——————————————————

答案1——————————————————
% STAY HOME STAY SAFE
% the following code is in Matlab, please refer to the screenshot
% initialize a variable t and x
syms t
syms x
% calculate the expression which is within integral
expression = exp((-1*x*x)/2);
% integrate from -infinity to t
F = int(expression,[-inf,t]);
% calculate the value of P(t) by multiplying (1/sqrt(2*pi)) with vpa of F
P(t) = (1/sqrt(2*pi)) * vpa(F)

答案2————————————————————————————
Matlab
% initialize a variable t
syms t
% calculate the expression which is within integral
expression = exp((-1*x*x)/2);
% integrate from -infinity to t
F = int(expression,[-inf,t]);
% calculate the value of P(t) by multiplying (1/sqrt(2*pi)) with vpa of F
P(t) = (1/sqrt(2*pi)) * vpa(F)

答案1——————————
Matlab Code for implementation of Bisection, Newton, Secant and Fixed point method:
clear all;
clc;
fprintf(‘\n\t\t\t\tBisection method\n\n’)
f3=@(x) (x-1)*(x-2)*(x-3)*(x-4)*(x-5)*(x-6)*(x-7)*(x-8)*(x-9)*(x-10)
m=10
a=1-0.001;
b=10+0.001;
eps=0.001
delta=0.001
u=f3(a);
v=f3(b);
e=b-a;
fprintf(‘a=%d\tb=%d\tf(a)=%f\tf(b)=%d\n\n’,a,b,u,v)
if(sign(u)==sign(v))
exit(1);
end
for k=1:m
e=e/2;
iteration(k)=k;
u=f3(a);
v=f3(b);
c=a+e;
mid(k)=c;
w=f3(c);
fprintf(‘\nk=%d\tf(c)=%d\tf(a)=%f\tf(b)=%d’,k,w,u,v)
if(abs(e)<=delta || abs(w)<=eps) break; end if(sign(u)==sign(w)) a=c; else b=c; end end T=table; T.iteration=iteration'; T.mid=mid'; T fprintf('\n\t\t\t\tNewtons method\n\n') fprintf('\nFor x0=1\n\n') syms x f4=@(x) (x-1)*(x-2)*(x-3)*(x-4)*(x-5)*(x-6)*(x-7)*(x-8)*(x-9)*(x-10) x0=1; m=10; eps=0.001; delta=0.001; v=f4(x0); f5=diff(f4(x)); fprintf('x0=%d\tf(x0)=%f\n\n',x0,v) if(abs(v)abs(v))
x0=x0+x1;
x1=x0-x1;
x0=x0-x1;
u=u+v;
v=u-v;
u=u-v;
end
iteration(i)=i;
s=(x1-x0)/(v-u);
x1=x0;
v=u;
x0=x1-v*s;
X(i)=x0;
u=f(x0);
fprintf(‘\nk=%d\tx%d=%d\t\tf(x%d)=%f\n’,i,i,x0,i,u)
if(abs(v)