美文网首页
代写EN 560.601作业、MATLAB编程作业代做、代写MA

代写EN 560.601作业、MATLAB编程作业代做、代写MA

作者: feiyahui | 来源:发表于2019-04-25 16:19 被阅读0次

    EN 560.601 - Spring 2019Homework #9Due on 12PM April 24th, 2019This problem set contains significant portion of coding. So please attachyour code and the result in your HW.1. Using Fourier Integral to obtain the solution of heat equation ut = c2uxx in (∞, +∞), satisfying the following initial condition u(x, 0) = f(x).Please verify that u(x, t) satisfy the initial condition.(a) f(x) = 1/(1 + x2)(b) f(x) = sin(x)/x, Please plot the solution u(x, t) with c = 1.2. Step size for DifferentiationConsider the polynomial function f(x) in the domain x ∈ [0, 0.3]We can calculate the first derivative of this polynomial analytically. (a) Discretize the domain [0, 0.3] first using step size 0.1, (xk=0:0.1:0.3).Use the O(x2) accurate center difference scheme to find outthe values of the first derivative f0(xk) at these discretized points.(At boundaries use O(x2) accurate forward- and backward-schemes.)Store these values as a column vector. Compute the maximumof the absolute error over all values of f0(xk).(b) Repeat the same problem with different step sizes . Find the maximum of the absolute errors overall values of f0(xk) in a 1 × 6 row vector. Please plot these errorsusing a logarithmic scale for the y-axis. In Matlab, the commandsemilogy might help. From this figure, you will find out thereis one step size that has the smallest absolute error. Find thisoptimal step size xopt. What is the theoretical optimal step size?Does the numerical result fit the theoretical result?13. Determining the Global Error of an Numerical IntegrationSchemeGiven an numerical integration scheme, e.g. the Trapezoidal Rule andthe Simpson’s Rule, it is generally difficult to derive the global truncationerror analytically. In the case of the Trapezoidal Rule, the globaltruncation error is�where a and b are left and right boundaries of the integral and c ∈ [a, b].We want to verify such an error term of an arbitrary integration schemenumerically.Suppose an engineer proposed a new integration method and claimedit is very accurate. In the first three subintervals of the integrationdomain [x0, x3],�So the integration formula for the whole domain [a, b] isZ xNf(x0) + 3f(x1) + 3f(x2) + 2f(x3) + 3f(x4)+ 3f(x5) + 2f(x6) + . . . + 3f(xN?1) + f(xN )�(1)In order to implement this method, N should have the form of N =3k, k = 1, 2, . . ..Your boss wants you to verify this method and find out how accuratethis method could be.(a) First we want to determine the order of accuracy for this method.We pick a test function f(x) = exp(7x) on the domain [0, 1.5].The antiderivative of this function can be easily calculated, thatis F = exp(7x)/7. Pick N = 399 and construct equidistant points2for x. There should be N + 1 points in total. Implement thisnumerical integral method on the domain [0, 1.5] in MATLABand compare with true value (Qtrue=F(1.5)-F(0)). Find theabsolute value of the error (err1=abs(Q1-Qtrue)).Repeat the previous step for N = 798. You can see ?x is almostdecreased by half now. Find the absolute value of the new error(err2=abs(Q2-Qtrue)). Let’s divide err1 by err2 and see thefactor the global error changes when ?x is decreased by half.Based on this, you are able to determine the order of accuracy forthis method.(b) Second we are interested in the derivative term of the global error.For the Trapezoidal Rule, the derivative term is the secondderivative of f(x). This implies if f(x) is a linear function, say,f(x) = ax + b, the global error is always 0. Because f00(x) is always0. We will use this idea to find out which derivative termappears in the error.Use N = 399 and construct equidistant points for x. But this timechange the test function to six polynomials with different degrees.Here choose f(x) to be x. Again, implement thisnumerical integration method on the domain [0, 1.5] in MATLABfor these six different f(x) and compare with true values. Find theabsolute values of error for each f(x) into a 1 × 6 row vector oneby one. Based on the error values, you can tell which derivativethis error term has. Some values are about 10?16, and you cantake these values as 0 since they are near the round-off error.(c) You can almost determine the global error term of this method.The only part left is the coefficient term. In fact, you can find outthe coefficient based on the result in the second part. Try it out.4. Van Der Pol OscillatorConsider the van der Pol oscillatorIn order to integrate this equation with the standard solution techniques,it has to be written as a system of first order differential equations.(a) Solve the equation for t = [0 : 0.01 : 32] using ode45. The initialconditions are y(t = 0) = 2 and dy(t = 0)/dt = 0. Plot thesolution and note the intermittent behavior.3(b) We want to investigate how many steps ode45 requires. Solve thesame problem, but now do not specify to ode45 where to evaluatethe solution (by only supplying the start and end times [0, 32]).Also, solve the same problem with ode15s. Save the number oftime-steps for both of methods as a 2×1 vector with ode45 resultsfirst and ode15s results second.Notes: Plot both solutions with points instead of solid lines. What doyou see? ode15s solver is appropriate for stiff ODEs. This means thatthe solver can adjust its step-size to be small when accuracy is needed inregions of rapid changes and to be bigger in regions where the solutionis changing slowly without worrying about having to maintain stability.Even though the cost per time step is generally more expensive thana non-stiff solver, the stiff solvers usually are able to take bigger timestepson average, and as a result solve the problem quicker.4本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

    相关文章

      网友评论

          本文标题:代写EN 560.601作业、MATLAB编程作业代做、代写MA

          本文链接:https://www.haomeiwen.com/subject/grpzgqtx.html