## 50 Reputation

19 years, 159 days
Attock, Pakistan

## @Carl Love  Thanks for responding, ...

Thanks for responding, you are always kind enough to help.

I am looking forward for the correct use of assume.

## its reverse...

I wanted fortran to get results from maple but it appears ....

## how to get enlgish letters out of the ou...

Thanks for being kind as always!!

I have used the modified hex function, since again converting back into hex is not required, atleast in my opion.

Hex:= Op-> Bits[Op]((x-> convert(x, decimal, hex))~([_rest])[]):

so

Hex(Xor, number8, number10);

produces

[135399130723416346148043216439012396011187569358532688785785764362122539264219933784229812283875844333742032760744960044418787350951111238393638380780987425878360323628003426912480696398192174745027138536129118958993063486107642483026733785351712027894440571834446333609196720971248003260878944007596966736]

and now using

convert( [Hex2(Xor, number8, number10)], bytes)

gives an error, Error, integer too large in context.

However if I use the orginal hex function it does the conversion, why?

So when I got a list of ascii bytes, then the conversion to plain english text is not being done.

Attached is my sheet.

first_optional_progr.mw

## however...

restart:

assume(n::integer):

is(n^2<=2^n);

is working.

But

restart:

assume(n::integer, n>=3):

is(n^2<=2^n);

is not.

Thanks!

## Thanks for responding!!...

Thankyou very much for your time!!

Yes this solves my problem and it is more general than my previous solution

But for larger number of integrable integrals in equation, its is really tedious to type each different form of integrand.

## Thanks for responding!!...

Thankyou very much for your time!!

Yes this solves my problem and it is more general than my previous solution

But for larger number of integrable integrals in equation, its is really tedious to type each different form of integrand.

## Yes but it would be really great if the ...

Thanks for responding!

No. I dont need the term you mentioned.

In general I only need terms which are linear power( caution not degree)

For example I do like integration of terms like like:

1. phi[i](y)*diff(w(y), y)

2.phi[i](y)*diff(w(y), y\$2)

In general I need terms like

3. diff( phi[i](y), y\$m) *diff(w(y), y\$ k) ; where m < k ( but this is not required in this problem, In this specific problem I require integration for terms like term 1 and term2

integration of terms like

phi[i](y)*diff(w(y), y)^2

phi[i](y)*diff(w(y), y)^k

diff( phi[i](y), y\$2)*diff(w(y), y\$n)^k

should be avioded

## Yes but it would be really great if the ...

Thanks for responding!

No. I dont need the term you mentioned.

In general I only need terms which are linear power( caution not degree)

For example I do like integration of terms like like:

1. phi[i](y)*diff(w(y), y)

2.phi[i](y)*diff(w(y), y\$2)

In general I need terms like

3. diff( phi[i](y), y\$m) *diff(w(y), y\$ k) ; where m < k ( but this is not required in this problem, In this specific problem I require integration for terms like term 1 and term2

integration of terms like

phi[i](y)*diff(w(y), y)^2

phi[i](y)*diff(w(y), y)^k

diff( phi[i](y), y\$2)*diff(w(y), y\$n)^k

should be avioded

## Thank you very much!!!...

Thanks alot for solving my problem.

God Bless you. You are always very kind!!!

Thats exactly what I needed.

To get linear terms in a[j], a[j+1/2] and a[j+1],  I would do
coeff(coeff(coeff(lhs(eq10_1), a[j], 1), a[j+1],0 ), a[j+1/2], 0);
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 1);
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],1 ), a[j+1/2], 0);

and to get nonlinear terms, I would require to do something like

coeff(coeff(coeff(lhs(eq10_1), a[j], 3), a[j+1],0 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 2), a[j+1],0 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 3)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 2)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],3 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],2 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 1), a[j+1],1 ), a[j+1/2], 1)+...
;

as you can see there are alot of permutations 4P3 to collect all the nonlinear terms. I want to collect them at once. Does there exist a more clean way??

## Thank you very much!!!...

Thanks alot for solving my problem.

God Bless you. You are always very kind!!!

Thats exactly what I needed.

To get linear terms in a[j], a[j+1/2] and a[j+1],  I would do
coeff(coeff(coeff(lhs(eq10_1), a[j], 1), a[j+1],0 ), a[j+1/2], 0);
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 1);
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],1 ), a[j+1/2], 0);

and to get nonlinear terms, I would require to do something like

coeff(coeff(coeff(lhs(eq10_1), a[j], 3), a[j+1],0 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 2), a[j+1],0 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 3)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],0 ), a[j+1/2], 2)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],3 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 0), a[j+1],2 ), a[j+1/2], 0)+
coeff(coeff(coeff(lhs(eq10_1), a[j], 1), a[j+1],1 ), a[j+1/2], 1)+...
;

as you can see there are alot of permutations 4P3 to collect all the nonlinear terms. I want to collect them at once. Does there exist a more clean way??

## just need one term...

Is there some way through which you can extract the coeficient of a[j] (when the exponent of a[j] is one) from eq10_1 without relaying on the order of the output?

## just need one term...

Is there some way through which you can extract the coeficient of a[j] (when the exponent of a[j] is one) from eq10_1 without relaying on the order of the output?

## Thanks but I am not following.....

I may be wrong but I think getting all the integrals is easy, we just need to do

seq( op(i, lhs(eq10_1), i=1..nops(lhs(eq10_1));

I have to extract the coeficients of a[j], a[j+1] and a[j+1/2] separately.

I was expecting to get same order of a[j], a[j+1] and a[j+1/2] in each of eq10_1, eq10_2 and eq10_3 to make the extraction easy and then the after six linear terms in each of the equation there would be nonlinear terms in a[j], a[j+1/2] and a[j+1].

Could you please modify your working to please help me first extraction coeficients of a[j] , and then of  a[j+1/2] and of a[j+1] and then the nonlinear terms extracted at once.

## Thanks but I am not following.....

I may be wrong but I think getting all the integrals is easy, we just need to do

seq( op(i, lhs(eq10_1), i=1..nops(lhs(eq10_1));

I have to extract the coeficients of a[j], a[j+1] and a[j+1/2] separately.

I was expecting to get same order of a[j], a[j+1] and a[j+1/2] in each of eq10_1, eq10_2 and eq10_3 to make the extraction easy and then the after six linear terms in each of the equation there would be nonlinear terms in a[j], a[j+1/2] and a[j+1].

Could you please modify your working to please help me first extraction coeficients of a[j] , and then of  a[j+1/2] and of a[j+1] and then the nonlinear terms extracted at once.

Unlike yours, I am not getting the correct output.

It appears the indexes of each term changes correction.mw

 1 2 Page 1 of 2
﻿