Can anbody solve this simple equation?

1 次查看(过去 30 天)
Hello everybody.I have attached the equation 1 and equation 2 in picture,How the values on right hand side are obtained, can anybody write it step by step.I will be very thankful.Please ignore the the X and 0 in Rg(0) anf Rg(X)

采纳的回答

Stephan
Stephan 2018-9-10
编辑:Stephan 2018-9-13
Hi,
to obtain values from your function use this:
fun_rg = @(R_g0,sigma_1,sigma_2,x)exp((x.^2.*(R_g0.^2-1.0).^2.*(1.0./2.0))./(R_g0.^2.*sigma_1.^2-R_g0.^2.*sigma_2.^2)).*sqrt(R_g0.^2)
This function handle takes values for: Rg(0), σ1, σ2 and x and gives back the value for Rg(x). For example with:
Rg(0) = 1.25
σ1 = 10
σ2 = 25
x = 3
>> fun_rg(1.25,10,25,3)
ans =
1.2478
The code to get this function is:
syms sigma_b sigma_1 sigma_2 R_g(x) R_g0
a = sqrt((sigma_b^2 + sigma_2^2) / (sigma_b^2 + sigma_1^2))
b = (sigma_2^2 - sigma_1^2) * x^2
c = 2 * (sigma_b^2 + sigma_2^2) * (sigma_b^2 + sigma_1^2)
fun_sigma_b = sqrt((sigma_2^2 - R_g0^2 * sigma_1^2) / (R_g0^2 -1))
fun_Rg_x = R_g(x) == a * exp(-b/c)
fun_Rg_x = simplifyFraction(subs(fun_Rg_x,sigma_b, fun_sigma_b))
fun_rg = matlabFunction(rhs(fun_Rg_x))
where a,b,c are stepwise written parts of the equation for Rg(x), so that Rg(x) can be written in the form:
R_g(x) = a * exp(-b/c)
This step is not neede but helps seeing what happens. To see the results in a more mathematical notation have a look at the file attached.
EDIT :
To get the result from equation 2 starting from equation 1 use:
syms sigma_b sigma_1 sigma_2 R_g(x) R_g0
a = sqrt((sigma_b^2 + sigma_2^2) / (sigma_b^2 + sigma_1^2))
b = (sigma_2^2 - sigma_1^2) * x^2
c = 2 * (sigma_b^2 + sigma_2^2) * (sigma_b^2 + sigma_1^2)
fun_Rg_x = R_g(x) == a * exp(-b/c)
fun_Rg_x = subs(fun_Rg_x,x,0)
fun_Rg_x = simplify(expand(isolate(fun_Rg_x,sigma_b)))
This will give the equation as you wanted. The mathematical notation is attached as a .pdf-file.
Best regards
Stephan
  3 个评论
Stephan
Stephan 2018-9-13
See my edited answer and the new attachment.
Haseeb Hassan
Haseeb Hassan 2018-10-7
Sir Stephan Jung...You won the show.Thumbs up for such a nice and clear answer.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Equation Solving 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by