## 7766 Reputation

17 years, 354 days

## How to define custom lighting?...

Maple 2022

I have been unable to add a directed light source to my plot3d drawings.  Perhaps I am misreading the documentation.  In the following experiment, I attempt to shine a red light from the direction (phi,theta) but changing the values of phi and theta don't seem to change the scene's lighting.  Can you change the lighting in your Maple?

```restart;
with(plottools):
with(plots):
Explore(display(sphere(), style=surface, color=yellow, light=[phi,theta,1,0,0]),
phi=0..Pi, theta=0..Pi);
```

## How many arguments does a proc take?...

Maple 2022

 > restart;
 > q := (u,v) -> u^2 + v^2;

 > D[3](q);

Error, (in D/procedure) index out of range: function takes only 2 arguments

Question: How does D know that  takes two arguments?

In general, if I pass  to another proc, how can I find out, within
that proc, that  takes only two arguments?

## How to differentiate a vector-valued fun...

Maple 2022

Given a vector-valued function z(u,v), I want to calculate the derivative of z with respect to its first argument by applying the D operator to it. I don't see how.  Any suggestions?

 > restart;
 > z := (u,v) -> < a(u,v), b(u,v) >;

Calculate the derivative of  with respect to its first argument:

 > P := diff(z(u,v), u);

Express  through the D operator:

 > Q := convert(P, D);

Question:  How do we obtain  directly by applying the D operator to

without the help of diff?  This one doesn't work:

 > D[1](z)(u,v); type(%, Vector);

## Unexpected results from pdsolve...

Maple 2022
 > restart;
 > pde := diff(u(x,t),t) + u(x,t)*diff(u(x,t),x) = 0;

These are all wrong:

 > pdsolve({pde,u(x,0)=f(x)}); pdsolve({pde,u(x,0)=sin(x)}); pdsolve({pde,u(x,0)=erf(x)});

But these ones are correct:

 > pdsolve({pde,u(x,0)=exp(x)}); pdsolve({pde,u(x,0)=x});

## Physics[Vectors] vector type...

Maple 2022

Is there  a specific type name for vectors in Physics[Vectors]?  Specifically, Let's say we want to write a proc whose argument is expected to be a (Physics) Vector, as in  these (trivial) demos:

```with(Physics[Vectors]);

f := proc(a_::???)
return a_ . a_;
end proc:

g := proc(a_::???, b_::???)
return a_ &x b_;
end proc:
```

What do we put in place of "???".

 1 2 3 4 5 6 7 Last Page 3 of 16
﻿