MaplePrimes Questions

I have the following expression (result of a calculation):

(1/1296)*cBooP0-(1/1296)*cSRP0-(1/1296)*tStartRamp*f__SR/N

Rather obviously the common factor 1/1296 can be factored out, except I cannot get Maple to factor the 1/1296 without also factoring out N, which I do not want. My desired end result is this:

(1/1296)*(cBooP0-cSRP0-tStartRamp*f__SR/N)

I don't seem to be able to coerce Maple to do this. I can freeze the tStartRamp*f__SR/N term (leaving the 1/1296 unfrozen), but in that case I don't get Maple to pull the 1/1296 factor out at all.

Any hint would be appreciated. I am doing this on Maple 2015. It is really a bit cosmetic, but sometimes I use Maple to write "smart" documentation & then I'd like to end up with a somewhat polished result.

Mac Dude

As the LPsolve package returns the solution points in a list format, how we can analyze the list if we're having a large instance problem? By large instance, I mean that there are around 1500+ variables in the linear programming model. 

Also, I have attached the screenshot of the output in this thread. To perform further analysis, I want to fetch the value of the DQV, QF, and UQT variables. But since the list contains the values as an expression, for example DQV[0, 0, 0, 0] = 0. In such cases, I cannot perform mathematical operations for the solution points results.

Also, if I can delete the DQV[0,0,0,0] from the expression mentioned above, I'll end with the numeric values list, which can then be converted into an array and make things easier for me. But currently, I'm struggling to delete the DQV part of the expression in one go (manually deletion for each expression, it's very time consuming to delete for 1500 variables).

Please suggest to me some approach to deal with this issue.

 

I am thanking you.

Regards

I am having a problem in evaluating a fluid flow problem at a boundary that includes infinity using a semi-analytic method Adomian Decomposition Method.

Find the attached code. Thanks in advance.

I recently upgraded to Maple 2022 just to use the new latex command. It seems I still can't export DataFrame types, I'm very disappointed. What am I doing wrong?

restart:
test:= DataFrame( [[1]], columns = [1] );
latex(test);

returns:

Error, (in DataFrame:-type) invalid input: subtype expects its 2nd argument, _t, to be of type type, but received And(symbol,satisfies(u -> substring(u,1 .. 9) = ('`\\mapleref`')))

Using File > Export As > LaTeX also doesn't work.
Printing the function call using printlevel := 100000: returns the following:

I've attached the worksheet for reference. Demo.mw
Does anyone know a workaround?

-Thanks for the Help

dear all

I try to create a table with four columns but someting wrong, the code contains few lines, 

table_columns.mw

Thank you for your help 

dear all

I have a system of 4 equations with 4 unkowns, but maple says that there 7 unknowns, and fsolve does return any solution

problem_solve_system.mw

Thanks

Hi! I'm new to Maplesoft. I would like to use it for my research. However, in order to do so, i have to construct an n-dimensional vector space, with vectors of the form A_1*B, A_2*B, ..., A_k*B, where A_i is a set of  n components from a Field (or ring) and B is the basis for the vector space.

It would REALLY help if you could give some ideas for me to bring this up, or else i will be forced to typset every one of the vectors i'll use in a matrix-multiplication form and will make considerably harder my work.

Just wondering how I do a loop over the contents of the table. I need both the index variable and the stored value associated with it.

This one apparently doesn't work.

F_vRk := table()

table( [ ] )

(1)

F_vRk["a"] := 1

1

(2)

F_vRk["b"] := 2

2

(3)

"for ind, val in F_vRk  do print(ind,val)  end do"

1, F_vRk

(4)

NULL

Download table_and_loop_1.mw

How do I simplify :

Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);
 

so that there are no imaginary terms in the denominator?  

I've tried, 

assum := Rin::real, omega::real, L::real, RL::real, 0 < Rin, 0 < omega, 0 < RL, 0 < L
Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);
 
(simplify(Zin) assuming assum);

but this doesn't work.

Dear all

I tried to solve a second order ODE, using dsolve but maple doest not return an explicit solution and no solution plotted. 

solve_ode.mw

thank you for your help 

Hey everyone,

I am trying to solve this differential equation for h(u):

h(u)^2 + 2*a*h(u)/sqrt(1 + diff(h(u), u)^2) = b^2

for given values of a and b. For a=3 and b=1 maple gives :
u - Intat((_a + 1)*(_a - 1)/sqrt(-(_a^2 + 6*_a - 1)*(_a^2 - 6*_a - 1)), _a = h(u)) - _C1 = 0, u - Intat(-(_a + 1)*(_a - 1)/sqrt(-(_a^2 + 6*_a - 1)*(_a^2 - 6*_a - 1)), _a = h(u)) - _C1 = 0

and I dont know what to do from there. Any help would be very much appreciated

Suppose you know that a person's public key modulus m is the following 200 digit number :
 
"166571820085905498772938593207359906487315774156514145089564134\

  67009247675308229223573508773729914408724747749233779284765414\

  62530835296763930087228227919982503096221081674037688617693027\

  1167988018683"

Factor m and check your factorization after the factors are found.  Use the following Fermat factorization method:  Note that if  
                        "m = x^2 - y^2"

 then 
                     "m = (x - y)*(x + y)"

. So if 
                          "1 < x - y"

 we have a non-trivial factorization of m. If m is a product of just two primes then one will be 
                            "x - y"

 and the other will be x + y.  This is the basis of the Fermat factorization method. Note that  
                        "m = x^2 - y^2"

 is equivalent to 
                        "x^2 - m = y^2"

.  So if for some number x we have type(sqrt(x^2 - m),integer) = true then we can set y = sqrt(x^2 - m) and using the above idea we may factor m.  Fermat's method is to take x = 
                        "ceil(sqrt(m))"

 and keep incrementing x by 1 till an x is found such that 
                           "x^2 - m"

 is a square.   [Note that you may need to use ceil(evalf(sqrt(m),200)).] 

If the number m is a product of two primes that are relatively close together then this method will factor m quickly. If you do not find the factors in just a few seconds, you probably have a bug in your program. For some reason Maple does not have this method builtin. 

[N.B. This exercise shows that if care is not taken in choosing the primes p and q used in the RSA system, than the system can be easily broken

Alice sent a message to Bob using the RSA system. The public key used to encode the message was 
[m,e] = [187454749788911503119994043213682616233000961, 23073697474256143563]. 

The enciphered message was
  [99763088506717050716379498520357841718875740, 120165413768425112311337085191282286020515442, 130554852152844850464253187688342192964186591, 30831038803473309186944039044693095063005267, 43791870977158745785820581340119798552660187, 69969965042359538654291028155927734707714502, 33869965925699990903801791477929460546990002, 33844215332363231914638130818590411552396086, 61034870951899306892357141802983347226683758, 152680702248950827958295294572717135277913525, 109591116592896191360922558098912453060002989, 155489947789995346755966254731407091292570943, 30508537854841352888337386800131678916944679, 45657204694505066046067342403378233363404150, 122580283375455701674982424288406984864898071, 63190645718352016104824679398188140019415424, 17253386795565064409576412640690151622064852, 76432681365602448262013510061731737725777808, 4419855123469897669096067167819380964828479, 87913005918401414546998775379426321338719933, 155434516526735215629181544556450169276890711, 74695381359901114443168866905755723039288800, 246854149837977729662442017899408430336317, 121766227774612543867361050340041336298158533, 166784352080096633524033563364825999607054575, 72405993088552642775735865911360107823805504]

Decipher this message. 

[Hint: Use of ifactor with the option 'pollard' may help. When you are finished with the decryption, you should use colons where possible to suppress unnecessary output. ]
 

Hi, 

This chunk of code gives me almost instantly the desired result with Maple 2015 but fails returning a result after 5 minutes when ran from  Maple 2020.
Changing the method or trying to tune their options doesn't fix the issue (for a larger value of the absolute tolerance the result, close to 1, is even obviously false).

Could you please help me to fix this?
TIA

restart;

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

with(Statistics):

Model_1 := (X, Y, Z) -> 1.3479120558270161+(-1)*.3390713110446567*X+1.0332964944900824*Y+(-1)*.8046331250569234*Z+0.9028899142595827e-1*X^2+(-1)*.28022910356641223*Y^2+1.3698461513469624*Z^2+0.6023630210658247e-1*Y*X+(-1)*.1988111077193626*Z*X+.6782902277463169*Z*Y+(-1)*0.7589729001497135e-1*X*Y*Z:

Model_2 := (X, Y, Z) -> .7215754021067852-.961682838202105*X+.4890842364596477*Y-.8214961524335734*Z+.15745942215497866*X^2-1.8023544416693338*Y^2+.36598799463016246*Z^2+1.3957614823018496*Y*X+.725398415577742*Z*X+1.9474707393604542*Z*Y-1.1780201448596594*X*Y*Z:

ExpMod_2 := unapply(expand(Model_2(Model_1(X1, Y1, Z1), Y2, Z2)), (X1, Y1, Z1, Y2, Z2)):
 

fy1 := PDF(Normal(0.1055, 0.0297), Y1):
fz1 := PDF(Normal(1, 0.2/3), Z1):
fy2 := PDF(Normal(0.17, 0.0476), Y2):
fz2 := PDF(Normal(1, 0.2/3), Z2):

C   := evalf(
         (1-eval(CDF(Normal(0.1055, 0.0297), Y), Y=0))
         *
         (1-eval(CDF(Normal(0.17, 0.0476), Y), Y=0))
         *
         (eval(CDF(Normal(1, 0.2/3), Z), Z=1.2)-eval(CDF(Normal(1, 0.2/3), Z), Z=0.8))^2
       ):

J  := Int(
        fy1*fz1*fy2*fz2*(1+tanh(10^4*(ExpMod_2(2.14, Y1, Z1, Y2, Z2)-1.25)))/2,
        Y1=0..0.4,
        Z1=0.8..1.2,
        Y2=0..0.4817,
        Z2=0.8..1.2,
        method = _CubaDivonne, methodoptions=[absepsilon=1e-8]
      ):

Prob(X__2 > 1.25) = nprintf("%1.3e", evalf(J)/C);
 

Prob(1.25 < X__2) = `8.462e-08`

(2)

 

Download 2020_issue.mw

Hi everyone,

I'm new to using Maple and I've got a question concerning the calculation of the Lie Symmetries of an ODE. Basically, I want to us the method described in this paper: https://doi.org/10.1063/1.3097304 in order to find a perturbative solution to a system of first oder ODE's.

I thus need a special form of the generator. However I can't quite figure out the notation from the examples provided in the maple helt. I also can't figure out why I can't calculate the general form of the Symmetries using the following code: 

restart;
with(PDEtools);
with(DEtools);
Imp := 2*diff(y(x), x)*y(x)/A(x) - diff(y(x), x) - diff(A(x), x)*(y(x)/A(x))^2 - C_p*diff(A(x), x) - eta(x)*lambda(x)*sqrt(A(x)*pi)/4*(y(x)/A(x) - 1)^2 = 0;
Conti := diff(y(x), x) - 2*sqrt(A(x)*pi)*beta(x)*(1 - H + C/A(x)) = 0
Cons := diff(eta(x), x) = 0

sys := {Cons, Conti, Imp};
DepVars = {A(x), eta(x), y(x)};
deteqs := DeterminingPDE(sys);

Help or a link to some more examples would be much appreciated. 

Regards,

Johannes

First 317 318 319 320 321 322 323 Last Page 319 of 2428