필터 지우기
필터 지우기

3= 2*(e^x - e^-x)

조회 수: 2 (최근 30일)
Mohammad Sulaiman Stanekzai
Mohammad Sulaiman Stanekzai 2017년 12월 21일
답변: Mohammad Sulaiman Stanekzai 2017년 12월 24일
How to solve this equation to find x? Thanks in advance

채택된 답변

Birdman
Birdman 2017년 12월 21일
편집: Birdman 2017년 12월 21일
syms x
eq=3==2*(exp(x)-exp(-x));
sol=vpasolve(eq)
If you solve it with solve command, you will obtain two roots, but one of them is a complex solution. Therefore, I directly solved it with vpasolve. But also see the solution for the solve command. The result is 0.6932.
sol=solve(eq)
  댓글 수: 1
Mohammad Sulaiman Stanekzai
Mohammad Sulaiman Stanekzai 2017년 12월 24일
Thank you Sir :) it worked perfectly.

댓글을 달려면 로그인하십시오.

추가 답변 (4개)

Torsten
Torsten 2017년 12월 21일
Substitute
e^x = y.
This leads to
y - 1/y = 3/2
or
y^2 - 3/2*y - 1 = 0.
Thus
y = 3/4 + sqrt(25/16) = 2.
Then
x = log(y) = log(2).
Or use
xsol = solve(3==2*(exp(x)-exp(-x)),x)
Best wishes
Torsten.

Star Strider
Star Strider 2017년 12월 21일
Much simpler, because your equation is equivalent to 4*sinh(x):
xarg = @(y) asinh(y/4)
Result = xarg(3)
Result =
0.693147180559945
Even the anonymous function is not necessary. I added it to convenience.

Image Analyst
Image Analyst 2017년 12월 21일
Try the fzero() function.

Mohammad Sulaiman Stanekzai
Mohammad Sulaiman Stanekzai 2017년 12월 24일
Thanks in advance for your great and helpful answers :)

카테고리

Help CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by