필터 지우기
필터 지우기

Need help solving equation in terms of a variable

조회 수: 1 (최근 30일)
Kevin Bodell
Kevin Bodell 2021년 4월 20일
댓글: Walter Roberson 2021년 4월 21일
I think this should be a simple solution, but I have an equation set equal to zero with two variables, "L" and "k." I'd like to solve the equation for "k" or ideally for "(k*L)/2." But am having trouble using the linsolve function. Below is the equation as well as the two linsolve approaches I've tried, both of which return a division by zero error.
eq8 = cos((L*k)/2)*cos((2^(1/2)*L*k)/4) - (2^(1/2)*sin((L*k)/2)*sin((2^(1/2)*L*k)/4))/2 == 0
%linsolve(eq8, k)
%linsolve(eq8, (k*L)/2)

답변 (1개)

Walter Roberson
Walter Roberson 2021년 4월 21일
syms L k Lk2
eq8 = cos((L*k)/2)*cos((2^(1/2)*L*k)/4) - (2^(1/2)*sin((L*k)/2)*sin((2^(1/2)*L*k)/4))/2 == 0
eq8 = 
K = solve(k*L/2 == Lk2, k)
K = 
eq8kL = subs(eq8, k, K)
eq8kL = 
vpasolve(eq8kL)
ans = 
fplot(lhs(eq8kL)-rhs(eq8kL), [-25 25])
Not a linear system; it is a periodic or quasi-periodic system, with an infinite number of solutions.
char(eq8kL)
ans = 'cos((2^(1/2)*Lk2)/2)*cos(Lk2) - (2^(1/2)*sin((2^(1/2)*Lk2)/2)*sin(Lk2))/2 == 0'
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 4월 21일
Maple says that the solutions are the θ such that
which looks reasonable from eq8kL .
Unfortunately that does not help find explicit formulas.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by