MATLAB: How can i solve this problem and plotting

equationnonlinear

x=1:1:50;
plot x,a grap?

Best Answer

I assume you want to find the values of a that make the integral = 75, for all values of x. if so, then the following should do it:
x = 1:50;
aguess = 50;
for i = 1:50
a(i) = fzero(@(a) fn(a,x(i)),aguess);
aguess = a(i);
end
plot(x,a,'o'),grid
xlabel('x'),ylabel('a')
function z = fn(a,x)
f = @(x) sqrt(1+(2*a*x).^2);
z = integral(f,0,x)-75;
end
Note that the a's found from the above are positive, but the negative equivalents would also work, because a is squared in the integral.
Related Question