From: Serdar GOKHAN on
Hi All,

How can we get analytical expressions of "kappa" and "gamma" from the below two equations by using Symbolic toolbox? Any kind of help is appreciated.
Regards
Serdar

1.st equation
Ip0*gamma+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)

2.nd equation
-Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma*z)*Is0*exp(-kappa*z)

From: Sean on
"Serdar GOKHAN" <fs_gokhan(a)hotmail.com> wrote in message <i171oo$9av$1(a)fred.mathworks.com>...
> Hi All,
>
> How can we get analytical expressions of "kappa" and "gamma" from the below two equations by using Symbolic toolbox? Any kind of help is appreciated.
> Regards
> Serdar
>
> 1.st equation
> Ip0*gamma+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)
>
> 2.nd equation
> -Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma*z)*Is0*exp(-kappa*z)
>

How are those "equations"? They're not equal to anything...

Anyway, once you figure out what those are equal to:
>>syms gamma_1 alpha_p Ip0 gb K L z alpha_s kappa %Note don't use 'gamma' it's a built-in function

>>doc solve
>>solve('eqn1','eqn2',var1,var2); %var1 = gamma1, var = kappa
>>
From: Serdar GOKHAN on
"Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i17934$del$1(a)fred.mathworks.com>...
> "Serdar GOKHAN" <fs_gokhan(a)hotmail.com> wrote in message <i171oo$9av$1(a)fred.mathworks.com>...
> > Hi All,
> >
> > How can we get analytical expressions of "kappa" and "gamma" from the below two equations by using Symbolic toolbox? Any kind of help is appreciated.
> > Regards
> > Serdar
> >
> > 1.st equation
> > Ip0*gamma+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)
> >
> > 2.nd equation
> > -Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma*z)*Is0*exp(-kappa*z)
> >
>
> How are those "equations"? They're not equal to anything...
>
> Anyway, once you figure out what those are equal to:
> >>syms gamma_1 alpha_p Ip0 gb K L z alpha_s kappa %Note don't use 'gamma' it's a built-in function
>
> >>doc solve
> >>solve('eqn1','eqn2',var1,var2); %var1 = gamma1, var = kappa
> >>
Thank you very much for your reply.
All the equations are equal to zero. And I changed gamma to gamma1

Ip0*gamma1+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)=0
-Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma1*z)*Is0*exp(-kappa*z)=0

when I try to solve usig your way, i.e,
solve('eqn1','eqn2',var1,var2); %var1 = gamma1, var = kappa

it says,
Unable to find closed form solution.
Do you have alternative way?
Thank you for your reply and assistance.
Regards.
Serdar
From: Walter Roberson on
Serdar GOKHAN wrote:
> Hi All,
>
> How can we get analytical expressions of "kappa" and "gamma" from the
> below two equations by using Symbolic toolbox? Any kind of help is
> appreciated.
> Regards
> Serdar
>
> 1.st equation
> Ip0*gamma+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)
>
> 2.nd equation
>
> -Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma*z)*Is0*exp(-kappa*z)

If those two formula are to be equated to zero and then the pair solved
for gamma and kappa, then I do not believe there is an analytical
formula for them. Isolating the two variables in terms of the others
involves finding the root of something of the form

c0 + c1 * x + c2 * exp(c3 + c4 * exp(x))

If the term inside the first exp() only involved x linearly and not
exp(x), then the root could be determined analytically using the
LambertW function, but I do not know of any equivalent function that can
be used when there is an x + exp(exp(x)) form.
From: Sean on
Walter Roberson <roberson(a)hushmail.com> wrote in message <1qGZn.10985$Hw.4661(a)newsfe10.iad>...
> Serdar GOKHAN wrote:
> > Hi All,
> >
> > How can we get analytical expressions of "kappa" and "gamma" from the
> > below two equations by using Symbolic toolbox? Any kind of help is
> > appreciated.
> > Regards
> > Serdar
> >
> > 1.st equation
> > Ip0*gamma+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)
> >
> > 2.nd equation
> >
> > -Is0*kappa*exp(-kappa*z)-alpha_s*Is0*exp(-kappa*z)+gb/K*Ip0*exp(gamma*z)*Is0*exp(-kappa*z)
>
> If those two formula are to be equated to zero and then the pair solved
> for gamma and kappa, then I do not believe there is an analytical
> formula for them. Isolating the two variables in terms of the others
> involves finding the root of something of the form
>
> c0 + c1 * x + c2 * exp(c3 + c4 * exp(x))
>
> If the term inside the first exp() only involved x linearly and not
> exp(x), then the root could be determined analytically using the
> LambertW function, but I do not know of any equivalent function that can
> be used when there is an x + exp(exp(x)) form.


In addition to this, if you run just the first equation and solve for both variables you'll see:
>>vars = solve('Ip0*gamma1+alpha_p*Ip0+gb/K*Ip0*Is0*exp(kappa*L)=0',...
'gamma1','kappa');
>>vars.kappa
ans = z %meaning that kappa is equivalent to z.

I'm not sure if this is what you meant for and could be a typo in your equation.