Question

Please provide me the minimum y vector that will be computed in this domain.

Please provide me the minimum y vector that will be computed in this domain.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
clear all;
close all;
%% we wrote same code as given, just made some changes according to given equation
xleft=-1;
xright=1;
N=20;
x=linspace(xleft,xright,N);
x=x';
dx=(xright-xleft)/(N-1);
yleft=1;
yright=0.74; %%%if you solve given integral the max value of y you will get is 0.74
M=(diag(-2+ones(N,1),0)+diag(ones(N-1,1),-1)+diag(ones(N-1,1),1))/dx^2;
M(1,:)=[1, zeros(1,N-1)];
M(end,:)=[zeros(1,N-1),1];

b=x./(x+exp(-1.*x));
b(1)=yleft;
b(end)=yright;
%solve
y=M\b;
%plotting x vs y
plot(x,y);
xlabel('x');
ylabel('y');
title('given equation plot');
%%it will return minimun value of y vector on command window
min(y)

Add a comment
Know the answer?
Add Answer to:
Please provide me the minimum y vector that will be computed in this domain.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT