MATLAB Answers

How to calculate the limit of an integral?

13 views (last 30 days)
Is it possible to calculate the value d0 of the below equation? If so, how may I go about doing so?

Accepted Answer

Roger Stafford
Roger Stafford on 23 Jun 2016
Assuming you already know the numerical values of rho, P(K-1), alpha, r0, r, and the function f(x,r), you should be able to solve for d0 with the use of matlab’s ‘fzero’. For that purpose you need to create a function for use in ‘fzero’ which computes the difference in both sides of your equation for input values of d0. Using this you can make a plot of this function’s values as d0 varies and note where it crosses zero. Then you can pick two points on either side of the crossing point and set ‘fzero’ to work with those two points as your initial two-point estimate and locate the crossing point with accuracy. Of course the above function will have to call on matlab’s ‘integral’ function three times for each evaluation.

More Answers (1)

Juan Jose Ortiz Torres
Juan Jose Ortiz Torres on 22 Feb 2019
In my case, I need to get the final limit of an line lenght integral. so I put this on matlab:
syms x a1
solve(int(x^2 + 2*x + 3,x,0,a1)==4,a1)
And I got:
ans =
root(z^3 + 3*z^2 + 9*z - 12, z, 1)
root(z^3 + 3*z^2 + 9*z - 12, z, 2)
root(z^3 + 3*z^2 + 9*z - 12, z, 3)
So I use the fzero function:
fzero(solve(int(x^2 + 2*x + 3,x,0,a1)==4,a1))
But it doesn't work
  1 Comment
madhan ravi
madhan ravi on 22 Feb 2019
Remove fzero and add 'maxDegree’,3) in solve or just simply use vpasolve() instead of solve()

Sign in to comment.

Categories

Community Treasure Hunt

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

Start Hunting!

Translated by