MaplePrimes Questions


 

``

eq1 := -6*sin(theta)*(cos(theta)^2*(diff(n(r, theta), r))*a^3+cos(theta)^2*a^4+3*cos(theta)^2*a^2*r^2+(diff(n(r, theta), r))*a*r^2+2*r^4-n(r, theta)*a*r)/(r^2+cos(theta)^2*a^2)^(3/2) = 0

-6*sin(theta)*(cos(theta)^2*(diff(n(r, theta), r))*a^3+cos(theta)^2*a^4+3*cos(theta)^2*a^2*r^2+(diff(n(r, theta), r))*a*r^2+2*r^4-n(r, theta)*a*r)/(r^2+cos(theta)^2*a^2)^(3/2) = 0

(1)

eq2 := -(6*(cos(theta)^2*sin(theta)*(diff(n(r, theta), theta))*a^3+a^4*r*cos(theta)+2*cos(theta)*a^2*r^3+cos(theta)*r^5+n(r, theta)*a^3*cos(theta)+cos(theta)*n(r, theta)*a*r^2+sin(theta)*(diff(n(r, theta), theta))*a*r^2))/(r^2+cos(theta)^2*a^2)^(3/2) = 0

-6*(cos(theta)^2*sin(theta)*(diff(n(r, theta), theta))*a^3+a^4*r*cos(theta)+2*cos(theta)*a^2*r^3+cos(theta)*r^5+n(r, theta)*a^3*cos(theta)+cos(theta)*n(r, theta)*a*r^2+sin(theta)*(diff(n(r, theta), theta))*a*r^2)/(r^2+cos(theta)^2*a^2)^(3/2) = 0

(2)

pdsolve([eq1, eq2])

{n(r, theta) = (1/2)*(4*r^2+2*a^2*cos(2*theta)+2*a^2)^(1/2)*((Int(-2*((a^4+3*a^2*r^2)*cos(2*theta)+a^4+3*r^2*a^2+4*r^4)/((4*r^2+2*a^2*cos(2*theta)+2*a^2)^(1/2)*(a^2*cos(2*theta)+a^2+2*r^2)*a), r))*sin(theta)+Int(5*(a^2*(-(1/5)*(a^2+4*r^2)^2*cos(3*theta)+(-(3/5)*a^4-(8/5)*r^2*a^2)*cos(5*theta)-(1/5)*a^4*cos(7*theta)+cos(theta)*(a^4+(16/5)*r^2*a^2+(16/5)*r^4))*(4*r^2+2*a^2*cos(2*theta)+2*a^2)^(1/2)*(Int(16*((a^2+3*r^2)*cos(2*theta)+a^2-r^2)/(4*r^2+2*a^2*cos(2*theta)+2*a^2)^(5/2), r))-(16/5)*(a^2+r^2)*((-(1/2)*a^2-2*r^2)*cos(3*theta)-(1/2)*a^2*cos(5*theta)+cos(theta)*(a^2+2*r^2))*r)*a/((4*r^2+2*a^2*cos(2*theta)+2*a^2)^(1/2)*((32*a^4+64*a^2*r^2)*cos(2*theta)+8*a^4*cos(4*theta)+24*a^4+64*r^2*a^2+64*r^4)), theta)+_C1)/sin(theta)}, {n(r, theta) = -(a^2*r+r^3)/a}

(3)

``


 

Download PDE_integral.mw

Hello all,

I would like to contacted (you can easiky have my mail) by the Makers of Maple Learn

about their philosophy of doing Mathematics.

I-d like to talk to them (possibly in French) .

Kind regards to all,

Jean-Michel

 

Hey guys im using maple 2022 with last version of Physics package (version 2022) , I know my question might be stupid but in the following expression 

restart;
with(Physics[Vectors]);
Setup(mathematicalnotation = true);
with(Physics);
Setup(op = {I__b, I__s, Omega, `ω_`});
eval(I__b . (diff(`&omega;_`(t), t)), {I__b = <<I__1 | 0 | 0>, <0 | I__2 | 0>, <0 | 0 | I__3>>, `&omega;_`(t) = <omega[1](t), omega[2](t), omega[3](t)>})

I want to get the following as result

but I keep getting the unevaluated one as follows

What am I doing wrong here, 

thanks in advance

 

 

 

i have a problem in an optimzation problem. in the problem using NLPSolve to find the minimum, i have an integration which i use the Int command to be solved in the optimization process, but this error occures: Error, (in Optimization:-NLPSolve) could not store Int(..) in a floating-point rtable 
please help to solve the problem, tnx in advance

restart:with(LinearAlgebra):

N:=3:

m:=Vector([ 1 , log(x+b3) , b2/(x+b3) ]):

A:=m.m^+:

for i to N do
m||i:=eval(A,[x=x||i]);
od:

M:=add(w||i*m||i,i=1..N-1)+(1-add(w||i,i=1..N-1))*m||N:

MM:=( LinearAlgebra:-Trace(MatrixInverse(M)) ):

IF1:=evalf(Int(MM,[b2=1..2,b3=1..2],method = _d01ajc,epsilon=0.001)):

s:= Optimization:-NLPSolve(IF1,w1=0..1,w2=0..1,x1=1..10,x2=1..10,x3=1..10,variables=[w1,w2,x1,x2,x3],initialpoint={w1=0.6,w2=.1,x1=8,x2=7,x3=5},maximize=false,method=modifiednewton)

Error, (in Optimization:-NLPSolve) could not store Int(Int(16.6666666666666679*(-448.000000000000057*ln(7.+b3)*ln(5.+b3)+76.1999999999999886*ln(8.+b3)^2*b3^2+.199999999999999956*ln(8.+b3)^2*b3^4+.399999999999999911*ln(5.+b3)^2*b3^4+527.500000000000000*ln(5.+b3)^2+780.799999999999727*ln(8.+b3)^2+191.100000000000023*ln(7.+b3)^2+89.0999999999999943*ln(5.+b3)^2*b3^2+9.79999999999999893*ln(5.+b3)^2*b3^3+6.39999999999999858*ln(8.+b3)^2*b3^3+400.*ln(8.+b3)^2*b3+12.3000000000000025*ln(7.+b3)^2*b3^2+84.0000000000000142*ln(7.+b3)^2*b3+356.*ln(5.+b3)^2*b3+.600000000000000089*ln(7.+b3)^2*b3^3-1176.*ln(8.+b3)*ln(5.+b3)+280.*ln(8.+b ... 99999999999716*ln(7.+b3)*ln(5.+b3))^2), b2 = 1. .. 2.), b3 = 1. .. 2.) in a floating-point rtable

 

 

Download LinearLog-A-Bayesian_1.mw

"Warning, unable to evaluate 2 of the 6 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct" How to fix it?

mww.mw

Hi, 

everyone! I want to define a function with a constant (i. e., 1/3 in the following figure). Actually, I tried it by "proc" or "piecewise", but it does not work.  So could you give me some suggestions? Thanks a lot!

g:=proc(n+1/4)
  if (n=0) then 1
    else 0
  end;
end proc;

How do i solve nonlinear coupled orinary differential equation with boundary conditions?

restart;
alias(u = u(x, y, z, t), f = f(x, y, z, t));
                              u, f
u := (diff(f, y, x, x, x, x))*f^4-(diff(f, x, x, x, x))*(diff(f, y))*f^3-4*(diff(f, y, x, x, x))*(diff(f, x))*f^3+8*(diff(f, x, x, x))*(diff(f, x))*(diff(f, y))*f^2-4*(diff(f, x, x, x))*(diff(f, y, x))*f^3+12*(diff(f, y, x, x))*(diff(f, x))^2*f^2-36*(diff(f, x, x))*(diff(f, x))^2*(diff(f, y))*f+24*(diff(f, x, x))*(diff(f, x))*(diff(f, y, x))*f^2-6*(diff(f, x, x))*(diff(f, y, x, x))*f^3+6*(diff(f, x, x))^2*(diff(f, y))*f^2-24*(diff(f, x))^3*(diff(f, y, x))*f+24*(diff(f, x))^4*(diff(f, y))+2*(diff(f, y, x, t))*f^4-2*(diff(f, y, x))*(diff(f, t))*f^3-2*(diff(f, x, t))*(diff(f, y))*f^3+4*(diff(f, x))*(diff(f, y))*(diff(f, t))*f^2-2*(diff(f, x))*(diff(f, y, t))*f^3-3*(diff(f, z, x, x))*f^4+3*(diff(f, x, x))*(diff(f, z))*f^3+6*(diff(f, x))*(diff(f, z, x))*f^3-6*(diff(f, x))^2*(diff(f, z))*f^2;

Given a module A, it has a proc which is called to set some internal variable to some value. This proc is meant to be used as initialization of the module, and not meant to return anything (i.e. procedure vs. a function in other languages, where a procedure does not return anything, but a function does).

When this proc is called from outside, the result of the last assignment in the proc is returned back to the user since that is the default behavior.

Is there a way to prevent this, other than adding an explicit NULL at the end of this proc?  Adding : at the end the last statement or at the end of the proc did not prevent this.

Here is an example

restart;
A:=module()
  local r::integer;
  export set_r:=proc(r::integer)   
    A:-r:= r:   
  end proc:
end module:

Now when calling  A:-set_r(10), Maple will return back/echo back 10. But this is not something I want.

A:-set_r(10);

    10

To prevent this, currently I add NULL; at end of the proc, like this

A:=module()
  local r::integer;
  export set_r:=proc(r::integer)   
    A:-r:= r:   
    NULL;
  end proc:
end module:

and now

A:-set_r(10);

returns nothing. Well, it returns NULL but that is like nothing.

My question is, is there a better way to do this? Can one define a proc in Maple that returns nothing?

Maple 2022.1

Hi everyone

I am trying to get the maximum value (angle) for a function, which is a solution from a ODE. I tried evalf(max.. which I already thaught wouldnt work. 

After that I installed the package "DirectSearch", again with no success. 

Does anybody know what I am doing wrong or how I am going to get the maximum. I added the maple file with the direct seach attempt. 

Thank you in advance!

Please how  can I use getdata to extract only 200x2 of 208x2 matrix from maple to excel.

For instance I have:

Q:= ( seq( seq( plottools:-getdata(ans1[s1,3])[j,3],j=1..3), s1=1));

It returns  208x2,  200x2 200x2 matrices and I can't extract it using 

`<|>`( seq( seq( plottools:-getdata(ans1[s1,3])[j,3],j=1..3), s1=1));

because the matrices have different dimension. Please, how can make 208x2 matrix to 200x2?

I am trying to figure out the width-at-half-maximum for a speical case of the difference of Guaussians.  In this scenario, I start with a standard formula for a Gaussian:

f(x, x0, S, Gmax) = -Gmax*(exp(S*(x - x0)^2*(-1/2)) - 1)*heaviside(x - x0)

 

where x0, is the location of the peak, S is the spread, and Gmax is the amplitude.  However, then I take a difference of two, assuming that x0 is 0 for both, that Gmax is unity for both, and the only thing free to vary between them is the spread.

fDOG(x, S_a, S_d) = f(x, 0, S_a, 1) - f(x, 0, S_d, 1)

 

Here I also assume that S_a > S_d, and that all values (including x) are real positive numbers.  In this case, I (believe) I always get a peak function that rises from y = 0 at x = 0 to some peak, and then falls back to y = 0 at infinity.

Differentiating fDOG and solving for y = 0, I can find the time of the peak of this function:

tpeak(S_a, S_d) = (sqrt(2)*sqrt(ln(S_a/S_d))/sqrt(S_a - S_d))

 

I can then find the amplitude at the peak by substituting tpeak for x in fDOG. However, what I would like to do now is is find the (two) points on x where y = fDOG(tpeak, S_a, S_d)/2.  Is this possible?

The goal here is to verify if the solution found by Maple is valid for the submitted ODE or not. Following the usual, 'odetest' and simply plugging the solution provided by Maple into the submitted ODE did not inspire confidence, so I am writing to see where I went wrong. The steps which were followed...

restart;
Equation := 2/(3*int(diff(y(x), x)*x^2/(x^2 - 1), x)^(3/2))
            + int(sqrt(2)*sqrt(y(x)), x) = 0:

ImpliciteSol := simplify(expand(dsolve(Equation)[1]));

     1/16*(-9*y(x)*(-y(x)*x^2)^(1/3)*6^(2/3)*x^2+16*_C1*x^(8/3)-24*x^2+6)/x^(8/3) = 0

yofx := simplify(expand(isolate(ImpliciteSol[1], y(x)))); # does not succeed

    (1/16*(-9*y(x)*(-y(x)*x^2)^(1/3)*6^(2/3)*x^2+16*_C1*x^(8/3)-24*x^2+6)/x^(8/3) = 0)[1] = 0

The goal here is to verify if the solution found by Maple is valid for the submitted ODE or not. Following the usual, 'odetest' and simply plugging the solution provided by Maple into the submitted ODE did not inspire confidence, so I am writing to see where I went wrong.

Hi

I'd like to know that why in the attachment "fsolve" does not work?

How can I evaluate the value of "A" in my file?

Many thanks in advance

NULL

restart:

N := 60: L := 10: a := 2*10^(-12):

eqn:=ns=1-((((N/A)+((A*L)^(L/(1-L))))^((1-L)/L))/(A*L))*(2+(a*exp((((N/A)+((A*L)^(L/(1-L)))))^(1/L)))/((A*L*(((N/A)+((A*L)^(L/(1-L))))^((L-1)/L)))+((a*exp((((N/A)+((A*L)^(L/(1-L)))))^(1/L)))))):

seq(fsolve(eqn,A),ns=[0.9603,0.9647,0.9691]):

 

NULL

Download A.mw

Hello everybody!

Im working on my great great (not great at all.. ) Dutch math book. Im really considering getting a copy of "Advanced Engineering Mathematics, by Robert Lopez". But hey, i worked through the first book, and now im at the half of the other second book. So i will finish it.

They left me with no clue on how to get the deal done, that is what is so perfect about this book i guess (i did a lot of books, but these Dutch books, yeah they do me like that) they will leave you in the dark, while they get all the grandeur because they know how to get it done, and you as the reader, well as a first timer, dont know how. Ive talked to a lot of students about this book. Yes it sucks. Classes full of students did agree on that, the majority did. So yeah, im trying to get a book delivered from the university library to a university libary closer to me, so i can get the book that does have good reviews.

The things i did learn from the Dutch math book did work great in statics and mechanics. That made short work of all the questions like a hot knife through butter.

THE ACTUAL QUESTION:
I cant prove this, because i dont know how. The translation says: a. Prove that the inverse of A exists for all values of p.

b. Determine the inverse of A

My take on it thusfar:

#Opdracht 9

#a.

with(LinearAlgebra)

A := `<,>`(`<|>`(1, 1, 1, 1), `<|>`(p, p+2, p+3, p+4), `<|>`(p^2, (p+2)^2, (p+3)^2, (p+4)^2), `<|>`(p^3, (p+2)^3, (p+3)^3, (p+4)^3))

Matrix(%id = 18446747008253355422)

(1)

``

``

``

#b.

B := MatrixInverse(A)

Matrix(%id = 18446747008306226350)

(2)

``

Thank you!

Greetings,

The Function

Download Mapleprimes_Question_Book_2_Paragraph_4.4_Question_9a.mw

First 54 55 56 57 58 59 60 Last Page 56 of 2212