[R] solve the equation in R

(Ted Harding) Ted.Harding at wlandres.net
Fri May 18 00:27:16 CEST 2012


On 17-May-2012 21:50:17 Petr Savicky wrote:
> On Thu, May 17, 2012 at 01:53:39PM -0500, Pei-Ling Lin wrote:
>> Hi all,
>> 
>> I need to solve this following equation which the unknown value (here is
>> "a") is on the exponent place, could anybody please help me to figure it
>> out? I tried to use lm.sol() or solve() function but it doesn't work...... 
>> 
>> Thanks for help,
>> Peiling 
>> 
>> 
>>   (x,   y) = (2.21, 1.01)
>> 
>>   y = 1 + x - ( 1 + (x)^a)^(1/a)
> 
> Hi.
> 
> First, plot the function
> 
>   f <- function(a) { 1 + x - ( 1 + (x)^a)^(1/a) - y }
>   x <- 2.21
>   y <- 1.01
>   a <- seq(0.1, 20, length=1000)
>   plot(a, f(a), ylim=c(-0.2, 0.2), type="l")
>   abline(h=0)
> 
> This suggests, that there is no root. This may also be obtained
> analytically.
> 
> Hope this helps.
> 
> Petr Savicky.

Well, certainly no solution for Y > 1. But if y < 1 then there
is a solution. Was the problem stated correctly?
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at wlandres.net>
Date: 17-May-2012  Time: 23:27:09
This message was sent by XFMail



More information about the R-help mailing list