litun

85 Reputation

5 Badges

6 years, 347 days

MaplePrimes Activity


These are replies submitted by litun

@Kitonum For each value of A, I need an m value (real number), but here only complex values.

If there are no real solutions to the equation then can I get the real value of m for which f(m) is closest to zero. I have a code like the following one

Some times the values obtained using this code and the functional value at that point mismatch.

@Christian Wolinski  Dear Sir, I encounterd this problem in probability theory. Parameters can take any value as long as the expression is consistent except α and β which are less than 1. m is a positive real number.

I have attached the maple program. This is just an extension of the original problem to include a sequence of m in the denominator.

 

test.mw

@Kitonum  Dear Sir

I have attached the maple program. I am unable to get the values of m after extending the problem to include a sequence of m in the denominator.

 

test.mw

@Markiyan Hirnyk I have written the code on my own. But i think this code can be reduced further with the experts. 

 

Doc1.pdf

@Markiyan Hirnyk Here I have denoted d/dt {dF(t)} by dF and dF(t) was written instead of dF dt. 

restart; with(LinearAlgebra)

``

NULL

dF := -.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t)

-.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t)

(1)

``

NULL

e3 := `<,>`(1, 1, 1); E := proc (m) options operator, arrow; IdentityMatrix(m) end proc; beta := `<|>`(.1, .6, .3); S := `<|>`(`<,>`(-3, 1, 1), `<,>`(1, -5, 2), `<,>`(0, 2, -4)); S0 := -S.e3

beta := Vector[row](3, {(1) = .1, (2) = .6, (3) = .3})

 

S := Matrix(3, 3, {(1, 1) = -3, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = -5, (2, 3) = 2, (3, 1) = 1, (3, 2) = 2, (3, 3) = -4})

 

S0 := Vector(3, {(1) = 2, (2) = 2, (3) = 1})

(2)

NULL

NULL

Z := `<|>`(x, y, z)

Z := Vector[row](3, {(1) = x, (2) = y, (3) = z})

(3)

ME := MatrixFunction(S+S0.Z, exp(t), t)

``

MEint := ME*(int(dF, t = 0 .. infinity))

``

Temp := fsolve(Equate(Z, beta.MEint))

{x = .1296853934-0.2874595325e-10*I, y = 0.9612770589e-1-0.2187483892e-10*I, z = 0.8996444123e-1-0.2022754781e-10*I}

(4)

assign(Temp)

Z

Vector[row]([x, y, z])

(5)

MEtest := MatrixExponential(S+S0.Z, t)*dF

beta.map(proc (c) options operator, arrow; int(c, t = 0 .. infinity) end proc, MEtest)

Vector[row]([.169346294590000-0.859024305330000e-11*I, .319089156366000-0.626232025790000e-11*I, .235764277699000-0.575715541450000e-11*I])

(6)

NULL

NULL

NULL

 

Download correctedex_1.mw

 

@Markiyan Hirnyk

I have checked the correctedex.mw code and the solution (value of Z) doesn't satisfy the equation

 

 

 

Please check the code I have attached.

restart; with(LinearAlgebra)

NULL

``

dF := -.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t);

-.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t)

(1)

NULL

``

e3 := `<,>`(1, 1, 1); E := proc (m) options operator, arrow; IdentityMatrix(m) end proc; beta := `<|>`(.1, .6, .3); S := `<|>`(`<,>`(-3, 1, 1), `<,>`(1, -5, 2), `<,>`(0, 2, -4)); S0 := -S.e3

beta := Vector[row](3, {(1) = .1, (2) = .6, (3) = .3})

 

S := Matrix(3, 3, {(1, 1) = -3, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = -5, (2, 3) = 2, (3, 1) = 1, (3, 2) = 2, (3, 3) = -4})

 

S0 := Vector(3, {(1) = 2, (2) = 2, (3) = 1})

(2)

``

Z := `<|>`(x, y, z)

Z := Vector[row](3, {(1) = x, (2) = y, (3) = z})

(3)

ME := MatrixFunction(S+Typesetting:-delayDotProduct(S0, Z), exp(t), t):

NULL

MEint := ME*(int(dF, t = 0 .. infinity)):

NULL

Temp := fsolve(Equate(Z, Typesetting:-delayDotProduct(beta, MEint)));

{x = .1296853934-0.2874595325e-10*I, y = 0.9612770589e-1-0.2187483892e-10*I, z = 0.8996444123e-1-0.2022754781e-10*I}

(4)

assign(Temp);

Z

Vector[row]([x, y, z])

(5)

MEtest := MatrixExponential(S+Typesetting:-delayDotProduct(S0, Z), t)*dF:

beta.map(proc (c) options operator, arrow; int(c, t = 0 .. infinity) end proc, MEtest)

Vector[row]([.169346294590000-0.859024305330000e-11*I, .319089156366000-0.626232025790000e-11*I, .235764277699000-0.575715541450000e-11*I])

(6)

``

``

``


Download correctedex_1.mw

@Markiyan Hirnyk Thank you very much

@Carl Love 

I have attached the maple program where fnormal fails to do the cancellation of factors.

checking.mw

@Carl Love 

I used fnormal to cancel nonzero factors only.

I want to cancel the zero factors, but I don't know how to do that?

e.g., I want to cancel R(x)=x f(x)/(x-4.94866427965495204 10^(-101)) g(x)

as 4.94866427965495204 10^(-101) is approximately equal to 0. I want to cancel the factor x with (x-4.94866427965495204 10^(-101)).

I think, I am clear to you now?

@Markiyan Hirnyk  it works fine

 

@Markiyan Hirnyk  I forgot to give braces at proper places. My question was a rational function whose numerator consists of 17 factors and the denominator consists of 18 factor between which 9 factors are matching up to 10 digits. I want to get the 10 factors cancelled automatically by the code.

@Markiyan Hirnyk  My R(s) contains 17 factors in the numerator and 18 factors in the denominator, out of 9 factors are to be cancelled as they match upto 10 digits. 

@Kitonum if i want to write the code only for the product of linear factors missing an intermediate factor

i.e. (s-a_1)(s-a_3)(s-a_4)(s-a_5)...(s-a_100) then what to write

@ecterrab Can you please give a working example with maple code for that.

 

@Adri van der Meer why ''i to 10 " not "i from 1 to 10" or some different number.

 

1 2 3 Page 2 of 3