how can i solve this problem and plotting?
2 views (last 30 days)
Show older comments
burak yilmaz
on 27 Feb 2021
Commented: burak yilmaz
on 27 Feb 2021
x=1:1:50;
plot x,a grap?
0 Comments
Accepted Answer
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.
More Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!