Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I solved this PDE by hand to verify Maple's solution. I think Maple solution is wrong. This PDE is the heat PDE on a bar (1D) with boundary coditions on both ends are function of time and zero initial conditions.

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = A(t), u(1, t) = B(t):
ic := u(x, 0) = 0:
sol1:=pdsolve([pde, ic, bc], u(x, t));

#now try when A(t)=sin(t),B(t)=t, use 20 terms for the sum
sol2:=simplify(subs([infinity=20,B(tau)=tau,A(tau)=sin(tau),A(0)=0,B(0)=0,A(t)=sin(t),B(t)=t],sol1)):
sol3:=simplify(value(subs(t=1,sol2))):
evalf(subs(x=0.5,sol3))

 

Also doing pdetest(sol1,pde); on the above solution does ot return zero as expected.

To verify more, I solved the same PDE again, but now using an explicit values for the boundary conditions A(t), B(t). Using A(t)=sin(t), B(t)=t. Then found the value again of the solution u at x=0.5 and t=1 like in the above, and it gives different value:

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = sin(t), u(1, t) = t:
ic := u(x, 0) = 0:
sol4:=pdsolve([pde, ic, bc], u(x, t));
sol5:=simplify(subs(infinity=20,sol4)):
sol6:=simplify(value(subs(t=1,sol5))):
evalf(subs(x=0.5,sol6))

Then I typed my hand solution into Maple and for the same values x=0.5, t=1 and same number of terms, I also get the same value 0.819. 

I do not see at all where the function sin integral should come into play in this solution. 

Could some Maple expert please check to see what is going on with this solution to Maple? 

Using Maple 2019.1 and Physics version 370

 

Hello, the passage to the Slideshow in Maple makes me lose the structure of my document ( Sections;sub-sections,.). Is there a way to optimize this display? Thank you

Hi all

trying to find analytically sin(erf(t)) and cos(erf (t)) rather than numerically

 

How to get the only solution x = (1/6)*sqrt(114)*a of this equation?
restart;
with(Student:-MultivariateCalculus);
u := `<,>`(-(1/4)*a, -(1/12)*sqrt(3)*a, -x);
v := `<,>`(-(1/2)*a, (1/6)*sqrt(3)*a, (1/2)*x);
`assuming`([solve(Angle(u, v) = arccos(2*sqrt(26)*(1/13)), x)], [And(a > 0, x > 0)])

Experts,

 

I have a series as follows: 

b := (sum((x[i]-xbar)^3, i = 1 .. n))/(n*[(sum((x[i]-xbar)^2, i = 1 .. n))/(n-1)]^1.5)

(b is skewness of x)

Taking the derivatives:

 

c1:=diff(b, xbar);

c2:=diff(b, x[i]);
 

now I want to evaluate c1 and c2 with a matrix input:

 

x:=<<0.556960605000000>,<3.39039994000000>,<2.09005200300000>,<0.645104568000000>,<5.31340491600000>,<3.32743462200000>,<0.635452131000000>,<1.56878297000000>,<0.282764039000000>,<1.02862059900000>,<3.14927606700000>,<0.654644768000000>,<1.30502450500000>,<2.13887537900000>,<2.11803658900000>,<7.29488570500000>,<0.478693554000000>>

where xbar is the mean value of x

 

Can you please help me

 

Thanks

 

 

 

 

 

i have two expressions. S1 and S2 are functions of sigma and tau. but i need derivative of sigma and tau with respect to S1 and S2. what should i do ? could any one help?


 

restart

S1 := -4*sqrt(sigma1^2 + 4*tau^2)*tau^2/((sigma1 + sqrt(sigma1^2 + 4*tau^2))^2*(1 + 4*abs(tau/(sigma1 + sqrt(sigma1^2 + 4*tau^2)))^2))

-4*(sigma1^2+4*tau^2)^(1/2)*tau^2/((sigma1+(sigma1^2+4*tau^2)^(1/2))^2*(1+4*abs(tau/(sigma1+(sigma1^2+4*tau^2)^(1/2)))^2))

(1)

S2 := 4*sqrt(sigma1^2 + 4*tau^2)*tau^2/((-sigma1 + sqrt(sigma1^2 + 4*tau^2))^2*(1 + 4*abs(tau/(-sigma1 + sqrt(sigma1^2 + 4*tau^2)))^2))

4*(sigma1^2+4*tau^2)^(1/2)*tau^2/((-sigma1+(sigma1^2+4*tau^2)^(1/2))^2*(1+4*abs(tau/(-sigma1+(sigma1^2+4*tau^2)^(1/2)))^2))

(2)

 

 

 


 

Download chain_rule_derivative.mw

Hey guys im still quite new to maple so bear with me on this one. 

Im trying to make it so when i press a button an some mathcontainers are going though some if statements, and then printing out the answer.

 

Heres the code 

 

use DocumentTools in 

Do(indkomst = %MathContainer2);
Do(fradrag = %MathContainer4);

if indkomst <= 44000 then 
    
    Do(%MathContainer3 = 0.08*indkomst);

elif 44000 < 0.92*indkomst and indomst <= 44000+fradrag then
    
    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000));

elif 44000+fradrag < 0.92*indkomst and indkomst <= 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag));

elif 0.92*indkomst > 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag) + 0.15*(0.92*indkomst - 467300));
    
end if;

end use; 
 

It correctly chooses what statement to use, but it just cant determine if its true or false, how do i fix this?

I'm trying to solve this to set of equations :

EQ1:=-1958143.922*k*wr+2468.8339*k^3*wr-0.9481118254e16*k^2-114000.8376*k^4:

EQ2 :=-1186578.220*R*k^2*wr-312683.0293*k^5-288960.9621*k^3*R:

using a loop for different value of R in the range this range (wr=0..10,k=0..10)

eqns:={EQ1,EQ2}:
for i from 1 by 1 to 101 do R:=(i-1):S:=fsolve(eqns,{k, wr},{wr=0..10,k=0..10}):v(i):=(subs(S,(wr)));w(i):=(subs(S,(k)))end do:

but i get this instead :

Error, invalid input: subs received fsolve({-312683.0293*k^5, -1958143.922*k*wr+2468.8339*k^3*wr-0.9481118254e16*k^2-114000.8376*k^4}, {k, wr}, {k = 0 .. 10, wr = 0 .. 10}), which is not valid for its 1st argument

is there another way to solves this equations more easly .

Hello guys, 

I have a probelm with computing an integral by maple. I dont know why maple cannot compute.

 

integral.mw

Thank you for your attention

Best

I do not understand why Maple can simplify this expression below when told that n is integer and also positive using a "," to separate the assumptions, but does simpify the same expression when using "and" to build the assumptions.

Here is an example

restart;
result:=int(x*cos(n*Pi/5*x),x=0..5)
simplify(result) assuming n::integer and n>0

But this works

simplify(result) assuming n::integer, n>0

What are the semantic differences between writing assuming "n::integer and n>0" and "n::integer,n>0" ? I thought these would be the same, but clearly they are not.

Maple 2019.1 on windows.

1/0;
Error, numeric exception: division by zero
lastexception;
            0, "numeric exception: division by zero"
lastexception; # ???
            Typesetting:-Typeset, "invalid input: %1 expects %2 arguments, but received %3", type, 2, 3

 

So, printing lastexception produces a new error!
When typesetting=standard, it's OK.

 

With this application developed entirely in Maple using native syntax and embedded components for science and engineering students. Just replace your data and you're done.

Pearson_Coeficient.mw

Lenin Araujo Castillo

Ambassador of Maple

 

Hello my Maple friends! :)
I was wondering if there is any command in Maple that can help me find the equation of a surface from it´s parametric form and the other way around, a parametric form from a surface equation!
For example, if
x :=(s, t) -> s cos(t)
y :=(s, t) -> s sin(t)
z :=(s, t) -> s^2

then S: x^2+y^2=z

Thank you for your help.
English is not my mother tongue; please excuse any errors on my part.

I have two data sets (time series) that appear to have similar profiles and am looking to find a way to establish a correlation measure. The linear (Pearson) coefficient is around 0.89, but since this particular function is nonlinear, can anyone suggest a method or routine that can be used to obtain this correlation?

Thank you!

 

Correlation.mw

Hello, would you please help with this problem

 I need to solve the system using polynomial coefficients

thank you 


 

restart

``

eq1 := diff(A(r), r, r)+(diff(A(r), r))/r+A(r)/r^2-a*r*A(r)+b*r^2*f*B(r)

diff(diff(A(r), r), r)+(diff(A(r), r))/r+A(r)/r^2-a*r*A(r)+b*r^2*f*B(r)

(1)

eq2 := diff(B(r), r, r)+(diff(B(r), r))/r+B(r)/r^2-c*r*A(r)+d*r^2*B(r)

diff(diff(B(r), r), r)+(diff(B(r), r))/r+B(r)/r^2-c*r*A(r)+d*r^2*B(r)

(2)

``

``

dsolve({eq1, eq2}, {A(r), B(r)});

{A(r) = DESol({-(-b*c*f*r^7+a*d*r^7-d*r^4+2*a*r^3-17)*_Y(r)/r^4-(-d*r^5-a*r^4-3*r)*(diff(_Y(r), r))/r^4-(-d*r^6+a*r^5-r^2)*(diff(diff(_Y(r), r), r))/r^4-2*(diff(diff(diff(_Y(r), r), r), r))/r+diff(diff(diff(diff(_Y(r), r), r), r), r)}, {_Y(r)}), B(r) = (a*r^3*A(r)-(diff(diff(A(r), r), r))*r^2-(diff(A(r), r))*r-A(r))/(b*f*r^4)}

(3)

dsolve({eq1, eq2}, {A(r), B(r)}, 'formal_series', 'coeffs' = 'polynomial')

Error, (in dsolve/FORMALSERIES) the first argument must be a homogeneous linear ode with polynomial coefficients

 

``

``

``


 

Download dsolve.mwdsolve.mw

1 2 3 4 5 6 7 Last Page 2 of 1555