How do I solve this equation in MatLab?
1 view (last 30 days)
Show older comments
Find the area of the region bounded by the hyperbola 9x^2−4y^2=36 and the line x=3.
I cannot find out the proper way to input this into MatLab. It requires trig substitution so I believe the problem stems from there but I am new to MatLab and don't know what I can do to fix it.
Here is my code:
>> syms x
>> EQ = 3*sqrt(x^2-4)
EQ =
3*(x^2 - 4)^(1/2)
>> A = int(EQ,2,3)
A =
log(161 - 72*5^(1/2)) + (9*5^(1/2))/2
>>
Here is the actual answer to the problem:
(9/2)*sqrt(5) - 6*ln((3 + sqrt(5))/2)
0 Comments
Accepted Answer
KSSV
on 24 Jun 2021
Why worry the final answer is same right?
syms x
eq = 3*sqrt(x^2-4) ;
A1 = int(eq,2,3) ;
A2 = (9/2)*sqrt(5) - 6*log((3 + sqrt(5))/2) ;
[double(A1) A2]
4 Comments
Walter Roberson
on 24 Jun 2021
format long g
syms x
eq = 3*sqrt(x^2-4)
A1 = int(eq,2,3)
A2 = (9/2)*sqrt(5) - 6*log((3 + sqrt(5))/2)
simplify(A1 - A2)
double(A1 - A2)
log(161 - 72*5^(1/2)) + (9*5^(1/2))/2
.... not 7.55445
More Answers (0)
See Also
Categories
Find more on Assumptions 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!