Need help solving equation in terms of a variable
4 views (last 30 days)
Show older comments
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)
0 Comments
Answers (1)
Walter Roberson
on 21 Apr 2021
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
K = solve(k*L/2 == Lk2, k)
eq8kL = subs(eq8, k, K)
vpasolve(eq8kL)
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)
1 Comment
Walter Roberson
on 21 Apr 2021
Maple says that the solutions are the θ such that
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/591395/image.png)
which looks reasonable from eq8kL .
Unfortunately that does not help find explicit formulas.
See Also
Categories
Find more on Calculus 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!