HELP! Double integration set up!

1 view (last 30 days)
Anna
Anna on 10 Apr 2013
Hello, I keep getting errors when I try to solve this double integration problem.
The equation is: e^x dx dy with inner integral from 1 to ln y and outer integral from 1 to e. I've heard that I have to use exp(1) for e and log y for ln y. And I did:
>> syms x y
>> int(int(exp(1)^x,x,1,log(y)),1,exp(1))
ans =
5920909807493902051712786124281/(1267650600228229401496703205376*log(1125899906842624/3060513257434037)) - ((3060513257434037/1125899906842624)^(log(3060513257434037/1125899906842624) + 1) - 1)/(log(1125899906842624/3060513257434037)*(log(3060513257434037/1125899906842624) + 1))
I solved the problem by hand and I got -1.476 so I believe that answer I got is wrong. (It looks wrong, actually). Does anyone have any idea what I need to fix here? I would really appreciate your help! I have to use int(int(....) command.

Answers (1)

Carlos Guerrero García
Carlos Guerrero García on 13 Nov 2022
Edited: Carlos Guerrero García on 14 Nov 2022
Just use the "vpa" instruction (variable precision arithmetic) after your script:
syms x y
int(int(exp(1)^x,x,1,log(y)),1,exp(1))
ans = 
vpa(ans)
ans = 

Community Treasure Hunt

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

Start Hunting!