## Why does pdsolve behave this way?...

Consider a standard initial/boundary value problem for the heat equation on the interval x ∈ [0,1]:

restart;
pde := diff(u(x,t),t) = diff(u(x,t),x,x);
ic := u(x,0) = f(x);
bc := u(0,t)=0,  u(1,t)=0;

Then
pdsolve({pde, ic, bc});
produces the expected Fourier series solution.

However, if we change the interval to x ∈ [-1,1], as in:
bc := u(-1,t)=0,  u(1,t)=0;
pdsolve({pde, ic, bc});

then Maple fails to return a solution.  Why?

## solution first order PDEs with Ics and Bcs ...

Dear all

I need a help how can i solve for example the following PDEs with Initial condition and boundary condition given at x=-1, and x=1.

pde:=diff(u(t,x),t)=diff(u(t,x),x\$2);

ics:=u(0,x)=sin(x);

Bcs:=diff(u(t,-1),x)=0;

Bcs:=diff(u(t,1),x)=0;

Many thanks

## using Isolate in RootFinding...

In using Isolate in RootFinding to compute roots of a real polynomial, the output contains, say, z= some number.  How to get rid of the "z =" so that I can declare that "some number" to be some variable?

## Use ** rather than ^ when printing to file...

I am writing a matrix to file where each matrix element is placed on a new line. An example of such code:

```restart:
HH:=Matrix([[x**2,x**z,z**12],[2*x,5**y,6**1]]):
filenameHH:=fopen("test.txt",WRITE,TEXT):

nRow,nCol :=LinearAlgebra[Dimension](HH);
for i from 1 to nRow do
for j from 1 to nCol do
fprintf(filenameHH,"%a\n",HH[i,j]):
od:
od:
fclose(filenameHH):
```

When this is printed to file, it will print as the power sign ^ regardless of the input it is given. This particular output file will be read in by another language, and due to this the power symbol "^" is not desired, but instead " ** ". By converting the matrix into a string format and applying string operations, this can be done; but is there a simpler way to do it?

-Yeti

## How to write the solution of a system of equations...

Hello,

I am solving a simple system of algebraic equations in a "for" loop. I would like to write all the values of solutions to a matrix, but I only get the symbols. Here is my code:

```A:=1:E:=0.1:L0:=<5,5,5,5>:m0g:=0.05:u:=<-5/4,-1/4,-3/4,-1/4>:v:=<-1/2,-3/2,1/2,1/2>:w:=<0,1,0,-1>:
Force:=Matrix(m,2);
for i from 1 to m do
r1||i:=H||i*L0(i)/(A*E)+H||i/m0g*(arcsinh(V_A||i/H||i)+arcsinh((m0g*L0(i)-V_A||i)/H||i))-sqrt(u(i)^2+v(i)^2);
r2||i:=V_A||i*L0(i)/(A*E)*(m0g*L0(i)/(2*V_A||i)-1)+H||i/m0g*(sqrt(1+((m0g*L0(i)-V_A||i)/H||i)^2)-sqrt(1+(V_A||i/H||i)^2))-abs(w(i));
rozw||i:=fsolve({r1||i, r2||i}, {H||i,V_A||i},H||i=0..1);Force(i,1):=H||i;Force(i,2):=V_A||i;subs(rozw||i,Force(i,..));
end do:
evalf(Force);
```

Iza

## Command "Generate" produces the same objects each ...

I need to create randomly several {1,2,3}-sequences of length 15. I execute:

> with(RandomTools):

> w:=Generate(list(posint(range = 3), 15)):

The problem is that when I close the program and then open and run it again, it always produces the same sequences.

What should I do in order to make it work really randomly? That is, to start at a "random" sequence as well?

Thanks!

## Microphone and Speaker embedded combinations...

Can any one help me correct my doc wherein I want to record 5 minutes with microphone and play it for the same duration through my speaker with a click of button component. I find problem in file path specification.This document in my PC is  in E:\A_PhD2017\MAPLEPhDFiles\RequestCorrection_Microphone_Speaker_from_primetime.mw

Components added are only three: microphone0, Speaker0 and Button0

 (1)

Edit Click Action for Button contains the following commands.

 (2)

No errors displayed for both the above doc tools use

Also nonstop continuous evaluation takes place! Where is the loop formation if at all there is any?

Ramakrishnan V

PhDFiles\....mw

## Is there a way to have diff(f,...) with f a symbol...

Hello,

I'm trying to write and simplify expressions involving partial derivatives of an arbitrary function, say f(x,y).

Specifically, I would like  to evaluate to , instead of

And  gives the same result.

Interestingly,  does evaluate to , as expected.

I could get some results by using a custom differentiation function

````diff/f` := proc(x,y,v)
if v = x then return D[1](f)(v,y):
elif v = y then return D[2](f)(x,v):
else return 0: # is there a fallback I can use without risking infinite recursion?
fi:
end proc:```

and it works for the simple case, but now  does not work.

All this makes me feel that there must be a way to get what I want by default, but I can't figure it out.

Is there? Thank you in advance!

## How does one code a recursive sequence that depend...

Hi Mapleprimes people and robots,

My question is regarding a recursive sequence.  It can be defined non-recursively as -

a(r) :=  0.8*3^r + 0.2*(-2)^r.

The first few terms are -

1,2,8,20,68,188, and so on.

Here is my Maple Worksheet.
recursive_sequence_A133467.mw      recursive_sequence_A133467.pdf

I want some Maple code that will produce 30 terms of this sequence.  It is defined as

s[1]:=1:
s[2]:=2:

for n>2 we let s[n] = s[n-1] + 6*s[n-2].

Let me know if my question does not make sense.

Regards,
Matt

## Convert axis tickmarks...

Hello,
I have a second problem which is related to converting horizontal axis to degrees ( or in terms of Pi :  0 - Pi/2 ).

Bengu

restart;
s1 := (1/3*(4*(1.66+10^(-1))^2-x^2))^(3/2)/(x^2*(1+.66+10^(-1)))-sin(2*a);
s2 := (1/3*(4*(1.66+10^(-2))^2-x^2))^(3/2)/(x^2*(1+.66+10^(-2)))-sin(2*a);
s3 := (1/3*(4*(1.66+10^(-3))^2-x^2))^(3/2)/(x^2*(1+.66+10^(-3)))-sin(2*a);
k1 := series(s1, x);
(-2)
4.769067180 x     + (-0.5773502688 - 1. sin(2. a))

2    / 4\
+ 0.01164914507 x  + O\x /
k2 := series(s2, x);
(-2)
4.293792441 x     + (-0.5773502692 - 1. sin(2. a))

2    / 4\
+ 0.01293857500 x  + O\x /
k3 := series(s3, x);
(-2)
4.247636750 x     + (-0.5773502693 - 1. sin(2. a))

2    / 4\
+ 0.01307916821 x  + O\x /
p1 := convert(k1, polynom);
4.769067180                                                2
----------- - 0.5773502688 - 1. sin(2. a) + 0.01164914507 x
2
x
p2 := convert(k2, polynom);
4.293792441                                                2
----------- - 0.5773502692 - 1. sin(2. a) + 0.01293857500 x
2
x
p3 := convert(k3, polynom);
4.247636750                                                2
----------- - 0.5773502693 - 1. sin(2. a) + 0.01307916821 x
2
x
with(plots, implicitplot);
implicitplot([p1, p2, p3], a = 0 .. (1/2)*Pi, x = 0 .. 3, style = point, symbol = [box, cross, circle], labeldirections = [horizontal, vertical], labels = ["&theta; (radians)", "Switching  field (T)"], color = [blue, red, black], symbolsize = 13);

Hello,

How can I fit my equation with the experimental data given below?

My equation is:  y = A*y^3+B*x ,  where x is the independent variable,  and y is the dependent variable.
Also how can I determine A and B constants?
Thanks

Bengu

restart;
Xvals := [.53993447, .5599647, .57995479, .59995566, .61996118, .63994512, .65994136, .6799731, .69996782, .71997949, .73997422, .75995044, .77994976, .7999707, .81995146, .83995244, .85996729, .87994951, .8999458];
Yvals := [-.79625455, -.75585259, -.67800183, -.47955884, -.25493698, -0.65747361e-1, .10114507, .26994542, .41484068, .50621122, .60363251, .65510417, .7251356, .75804148, .76002419, .8030069, .82774732, .8429559, .8692888];
with(Statistics);
points := ScatterPlot(Xvals, Yvals);
PLOT(CURVES(Matrix(19, 2, {(1, 1) = .53993447, (1, 2) =

-.79625455, (2, 1) = .5599647, (2, 2) = -.75585259, (3, 1) =

.57995479, (3, 2) = -.67800183, (4, 1) = .59995566, (4, 2) =

-.47955884, (5, 1) = .61996118, (5, 2) = -.25493698, (6, 1)

= .63994512, (6, 2) = -0.65747361e-1, (7, 1) = .65994136,

(7, 2) = .10114507, (8, 1) = .6799731, (8, 2) = .26994542,

(9, 1) = .69996782, (9, 2) = .41484068, (10, 1) = .71997949,

(10, 2) = .50621122, (11, 1) = .73997422, (11, 2) =

.60363251, (12, 1) = .75995044, (12, 2) = .65510417, (13, 1)

= .77994976, (13, 2) = .7251356, (14, 1) = .7999707, (14, 2)

= .75804148, (15, 1) = .81995146, (15, 2) = .76002419, (16,

1) = .83995244, (16, 2) = .8030069, (17, 1) = .85996729,

(17, 2) = .82774732, (18, 1) = .87994951, (18, 2) =

.8429559, (19, 1) = .8999458, (19, 2) = .8692888}, datatype

= float[8]), COLOUR(RGB, 0., 0.054901961, 0.47058824),

STYLE(POINT)), AXESLABELS("", ""), VIEW(DEFAULT, DEFAULT))
with(plots);
display(points);

Statistics:-Fit(a*y^3+b*x, Xvals, Yvals, y);
3
HFloat(2.996866026020011) y  - HFloat(0.9272751314432008)
example("?");

## First positive solution of trigonometric sys of eq...

I want to find the first positive solution of the system of trigonometric equations inside the loop.

The solutions are in the form of "d=number*_Z +number" but I need one exact solution to use it for next run of the loop.

restart;
L[0]:=0:
for i from 1 by 1 to 3 do
assume(0<d[i], d[i]<1):
assume(-0.01<a[i], a[i]<0):
L[i]:= L[i-1]+ d[i]:
sys[i]:={Re((-80*Pi*I*a[i]/((a[i]+1)^3))*exp(4*Pi*I*L[i])) = -0.4, Im((-80*Pi*I*a[i]/((a[i]+1)^3))*exp(4*Pi*I*L[i])) = 0.8}:
solve(sys[i], {a[i],d[i]}, useassumptions = true,AllSolutions=true):
end do;

These are the solutions:

d[1] = 0.03689590440 + 0.5000000000 _Z1

d[2] = -1.000000000 d[1] + 0.03689590440 + 0.5000000000 _Z2

d[3] = -1.000000000 d[1] - 1.000000000 d[2] + 0.03689590440 + 0.5000000000 _Z3

## Maple 2017 formatting issues ? ...

Hello all,

This is my first time with Maple, I have been a student of Mathematica for 7 years. I purchased Maple to learn a new software and I have heard great things about it. I somehow dont feel the flexibility of Mathematica in Maple documentations. It seems to be a bit constrained and not very straight forward in some aspects. Please correct me if I am wrong and also point out to tutorials or documents that I should be looking at before nose diving into Maple.

worksheet example here:

I have faced 2 simple problems which I think is a bug in some form, or I may be wrong. Please advise.

1. How do I insert Equation 7 before Equation 6? The worksheet wont let me do it.
2. Why are 'and' and 'in' bolded automatically in SECTION format?

## How to linearize a dynamic system equation?...

I need a help on the error message below as when I enter it on my browser the answer is that there isn't any hel for this subject.

Error Message:

Error, (in DynamicSystems:-EquilibriumPoint) the independent variable in the equations does not match the 'continuoustimevar' (t) specified by the DynamicSystems[SystemOptions].

Thank you!