how can I find the roots of the following function in terms of alpha?

6 views (last 30 days)
where:

Answers (1)

Simran
Simran on 28 Feb 2025
I see that you want to find the roots of the attached equation. To do so, you can use the fsolve” numerical solver.
Follow these steps to find the root of your equation:
1.) Define your function, “f”, as an anonymous function of “gamma_i” and “alpha”.
You can check this documentation to know more about “Anonymous functions” :
% Define the function as an anonymous function
f = @(gamma_i, alpha) 2 + (2 + (alpha^4) / (gamma_i^2 * beta(gamma_i, alpha)^2)) * ...
cos(gamma_i) * cosh(beta(gamma_i, alpha)) + ...
(alpha^2 / (gamma_i * beta(gamma_i, alpha))) * ...
sin(gamma_i) * sinh(beta(gamma_i, alpha));
2.) You can use a nested “beta” function to compute the equation. This function is used within the anonymous function “f” only.
% Nested function to compute beta_i
function b = beta(gamma_i, alpha)
b = sqrt(alpha^2 + gamma_i^2);
end
3.) I proceeded to solve this question using the iterative approach. First set an initial guess for “gamma_i”. You may need to adjust it according to the need of the problem.
% Initial guess for gamma_i
gamma_i_initial = 1; % You may need to adjust this based on your problem
4.) Chose a specific value of “alpha” for which the root will be found.
% Set the value of alpha
alpha_value = 1;
5.) Then configure the options for “fsolve” function that will display the iteration details.
% Configure options for the solver
options = optimoptions('fsolve', 'Display', 'iter');
6.) Finally call the “fsolve” function to find the root of the function.
% Solve for the root using fsolve
gamma_i_root = fsolve(@(gamma_i) f(gamma_i, alpha_value), gamma_i_initial, options);
With my assumptions, I found the root to be this:
You can refer to the following documentation link for more information:

Products

Community Treasure Hunt

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

Start Hunting!