Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You put the values .. 2. When using the method of the Green functions to analyze

ID: 3199348 • Letter: Y

Question

You put the values ..

2. When using the method of the Green functions to analyze the heat transfer by conduction, in solids with discrete sources of heat generation, integrals are generally obtained that must be solved numerically. In the case of an infinite solid with a heat generation in the shape of a sawtooth, the integral to solve is the following: You put the values ..

2. When using the method of the Green functions to analyze the heat transfer by conduction, in solids with discrete sources of heat generation, integrals are generally obtained that must be solved numerically. In the case of an infinite solid with a heat generation in the shape of a sawtooth, the integral to solve is the following:
Note that the integration variable is x' , n is the number of semi-teeth that heat generation has, hylson the semi-tooth dimensions (see figure), x, y, z are the coordinates where you want to find the temperature.



place the values ??that are needed and use Matlab to make a program that allows to solve the integral by the following methods in all cases make the flow diagram (flowchart): Trapezoidal Method).
(a) Compound trapezoid method (composite (20 points) temperature value for three different positions.
(B) The Simpson method 3/8 composite (Simpson's 38 method composite) Give the temperature value for three different positions (20 points)
(c) Using the Matlab quad function Give the temperature value for three different positions (10 points)
(BoNus) Find the analytic solution of this integral (10 points) place the values ??that are needed and use Matlab to make a program that allows to solve the integral by the following methods in all cases make the flow diagram (flowchart): Trapezoidal Method).
(a) Compound trapezoid method (composite (20 points) temperature value for three different positions.
(B) The Simpson method 3/8 composite (Simpson's 38 method composite) Give the temperature value for three different positions (20 points)
(c) Using the Matlab quad function Give the temperature value for three different positions (10 points)
(BoNus) Find the analytic solution of this integral (10 points) en forma de aiente ae siea, a nl dx' 0"4"U(x-x')2 +ly-(-1)m(fr.. (2nt( )"-1)n]}2 +@f Cn-1) R+1 mor da semi-dientes que

Explanation / Answer

%%%%%%This is the SCRIPT

%Here you can change the values
x=2;
y=3;
z=1;
h=2;
l=2;
n=10;
%We create the function (instead of x' we call the variable t)

f=@(t)(1./(sqrt((x-t).^2 + (y-((-1).^(n+1)).*((h./l).*t-((2.*n+((-1).^n)-1)./2).*h)).^2 + z.^2)));

a=(n-1).*l;
b=n.*l;

%%%We use the functions trapezoidal.m and simpsonthreeight.m we've created (they must be in
%the same location as the SCRIPT)
%Here we use 10000 intervals for trapezoidal
N=10000;
int1=trapezoidal(f,a,b,N);
%And we use 10000 intervals for simpson 3/8
N=99999;
int2=simpsonthreeight(f,a,b,N);
%%And using quad we get
int3=quad(f,a,b);
fprintf('The integral by the trapezoidal rule is %.12f ',int1)
fprintf('The integral by the simpson 3/8 rule is %.12f ',int2)
fprintf('The integral using quad is %.12f ',int3)

%%%%%%%%%Function trapezoidal.m

function integral1=trapezoidal(f,a,b,n)

if rem(n,2)~=0
error('Please provide an even number of intervals')
end
h=(b-a)/n;
x=linspace(a,b,n+1);
integral1=0;
  
for i=1:2:n-1
%Trapezoid
integral1=integral1+(h/2)*(f(x(i))+2*f(x(i+1))+f(x(i+2)));

end
  
integral1=double(integral1);
  
  
end

%%%%%%%%%%%Function simpsonthreeight.m

function integral3=simpsonthreeight(f,a,b,n)

if rem(n,3)~=0
error('Please provide a multiple of three as the number of intervals')
end
h=(b-a)/n;
  
x=linspace(a,b,n+1);
  
integral3=0;  
for i=1:3:n-2
%Simpson 3/8
integral3=integral3+(3*h/8)*(f(x(i))+3*f(x(i+1))+3*f(x(i+2))+f(x(i+3)));
  
end
  
integral3=double(integral3);
  
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote