Evaluating an integral with symbolic integral limits
Afficher commentaires plus anciens
Hi,
This is my code:
syms s y0
result = int( ((1+s)/(((1+s)^3-(1+y0)^3)/3 - ((1+s)^2-(1+y0)^2)/2)^0.5), s, y0, 1);
r = solve(result == 20^0.5);
I was trying to evaluate the following integral which has a lower integral limit as a symbolic variable y0. I wanted to evaluate the result of the integration (which I am assuming should be an expression in terms of y0 according to my code) by using the 'solve' function in matlab by equating the equation to be equal to 20^0.5 (Hence, giving a value for y0).
This is what i get for the result:
result: int((s + 1)/((s + 1)^3/3 - (s + 1)^2/2 + (y0 + 1)^2/2 - (y0 + 1)^3/3)^(1/2), s == y0..1)
But for the last line of the code, I get this error:
Error using mupadengine/feval (line 157)
MuPAD error: Error: The second argument must be of form x or x = a..b. [int]
Error in solve (line 170)
sol = eng.feval('symobj::solvefull',eqns,vars);
Error in HW3_graph_code (line 7)
r = solve(result == 20^0.5);
Should I use fsolve to solve the relation?
Thank you
Ushnik
1 commentaire
modem sudhakar
le 3 Avr 2016
Modifié(e) : Walter Roberson
le 3 Avr 2016
Hi mukherjee,
how you solved this problem. I am facing similar problem as below. Please sugget the way to solve it.
syms x V; Pr=solve( int(x.^2.* exp(-x-1./(x+V)),x,1,inf )-0.5 ==0,V); Warning: Explicit integral could not be found. Error using mupadengine/feval (line 157) MuPAD error: Error: The second argument must be of form x or x = a..b. [int]
Error in solve (line 160) sol = eng.feval('symobj::solvefull',eqns,vars);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Evaluation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!