syms x n
eq = tan(x^n) == x^n; % 定义方程
sol = solve(eq, x); % 求解方程的解
Running this code will yield the solution to the symbolic equation, where sol is a vector containing the symbolic solution.
For the eigenvalue of the equation tan(x) = x, it can be solved using the following code:
fun = @(x) tan(x) - x; % 定义函数
x0 = 1; % 选定初始点
x = fzero(fun, x0); % 求解函数的零点
Running the code will yield a numerical solution to the equation. It should be noted that for an equation where tan(x) = x, there may be more than one solution, so care needs to be taken to choose the appropriate initial point in order to solve the desired solution.