MATLAB Answers

how can i solve this problem and plotting?

24 views (last 30 days)

Accepted Answer

Alan Stevens
Alan Stevens on 27 Feb 2021
Edited: Alan Stevens on 27 Feb 2021
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.
  1 Comment
burak yilmaz
burak yilmaz on 27 Feb 2021
I’m so grateful for your help. Thank you.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!