 # Solving Equation in R-studio

Can someone help me in solving this equation in R-studio or How I can solve it in other programs and call it in R-studio?

Find the Value of z

``````x = 20
y =20
beta1= 2
beta2= 4
alpha2= 2
alpha1= 2
lambda = 4
q = 0.1831563889e-1

((alpha1*beta1)^(alpha1/(alpha1+alpha2))*(alpha2*beta2*x/(lambda^(1/alpha2)*y))^(alpha2/(alpha1+alpha2))*z^((alpha1+alpha2+1)/(alpha1+alpha2))-x)*exp(z)+x*q*exp(lambda) = 0
``````

Hi there,

You can solve equations like you have. I have taken a portion of your formula and made it into a compatible string to show you how to set it up:

``````library(Ryacas)

yac("Solve((z+20*0.1831563889e-1*exp(4)) == 0, z)")
#>  "{z== -0.3663127778*exp(4)}"
``````

Created on 2021-10-23 by the reprex package (v2.0.0)

As you can see in this example I replace the specific variables with their actual values and pasted the equation as a string. Depending on complexity etc it will then run and see if it can find a solution for your formula.

Thank you dear for your help.

Most welcome If it solved your problem feel free to mark it as the solution.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.