Numerically Solve for Upperbound on numerical Integral
Show older comments
Hi all,
I am trying to determine how to write the solver code for this example problem. I want to determine the quantitiy s for a given value v such that the following holds true. Although I have provided an explicit integrand here, I am looking for the general code to evaluate this properly with any specified integrand. I just used this one because I am not looking for an analytical solution to this example.
v = 1; % Just an example value
syms s
fun = @(x) x.^x;
vpasolve(integral(fun,x,0,s)==v,s)
The error I get is as follows:
Undefined function or variable 'x'.
vpasolve(integral(fun,x, 0,s)==v,s)
I am sure I am missing something silly. I would appreciate any help you can provide.
Accepted Answer
More Answers (1)
Walter Roberson
on 12 Feb 2019
syms x
vpasolve(int(fun(x), x, 0, s) == v, s)
Categories
Find more on Function Creation 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!