## 1390 Reputation

18 years, 274 days

## dxdy...

`D[1, 2](f)(x, y)` means `diff(f(x,y), x, y)`. It means first derivative in first coordinate, first derivative in second coordinate. Your expression ` ``D[1, 2](1/x);` implies x is a function of 2 coordinates.

## You can use solve or eliminate....

These problems tend to be difficult for obvious reasons. See the following:

```E0 := x^2 + y^2 - 10*x - 75 = 0;
E := (a*x + b*y + c)^2 + (d*x + e*y + f)^2 = r^2;
V := [[a, b, c], [d, e, f], r];

(lhs - rhs)(expand(E - E0));
C := {coeffs}(%, {x, y});
T := eliminate(C, {c, f, r});
S1 := simplify(T[1], T[2]);
S2 := [solve](T[2], {a, b, d, e});

#A solution:
applyop(evala, 2, subs(S1, S2[1], E));
subs(S1, S2[1], V);

#Another method:
map2(remove, evalb, evala({solve}(C, {a, b, c, d, e, f, r})));
select(proc(S) subs(S, r); is(0 < %) = true; end proc, %);
map(factor, map(allvalues, %));
subs(b=1, %);
```

Thumb if You like.

## The whole solution:...

```8*x*exp(-3*x^2) - 24*x^3*exp(-3*x^2); factor(%); solve(%, {x});```

## Consider this:...

```[sin(x), cos(x), tan(x), sec(x), csc(x), cot(x), sinh(x), cosh(x), tanh(x), sech(x), csch(x), coth(x)]; map(f -> f-convert(f, exp), %); simplify(%);```

Simplify does not reach across the exp & trig boundary. You are expected to introduce the relevant identities yourself.

Thumb if You like.

## Drawing a cylinder....

Here is a procedure tha draws a cylinder from a specified base, along a vector and of a given radius and number of sides:

```C := proc(d::list, v::list, r, n::posint)
local x, y, z, f;
description `Draws a cylinder with base at d along vector v, radius r, having n sides. Attach additional options for the plottools[cylinder] command used.`;

use LinearAlgebra in applyop(Normalize, {2, 3}, GramSchmidt([Vector(v), op(NullSpace(v))]), 2); end;
f := unapply(convert(add((% *~ [z, x, y])) + Vector(d), list), [x, y, z]);
use plottools in transform(f)(cylinder([0, 0, 0], r, 1, strips = n, _rest)); end;
end proc;

plots[display](seq(C([0, 0, 1], [10, 3, 10], 1, 40, op(opts)), opts =
[[color = COLOUR(RGB, 0.2, 0.4, 0.2), transparency = 0, style = contour, thickness = 0, linestyle = 1],
[color = green, transparency = 0.8, style = patchnogrid]]),
scaling = constrained, orientation = [160, 45, 30], contours = 20, labels = ['x, y, z'], lightmodel = light4);
```

Thumb if You like.

## Taylor all the way....

```F:=f->taylor(f, x, 4); F(ln(1+x)); F(ln(1+sin(x))); F(%%-%);```

Thumb if You like.

## Use combine....

Like before:

```A := cos(5*t)=a*cos(t)^5+b*cos(t)^3*sin(t)^2+c*cos(t)*sin(t)^4; collect(combine((lhs-rhs)(A)), {sin, cos}); solve({coeffs}(%, indets(%, dependent(t))));```

Thumb if You like.

## Repetition....

How is this different from this question you asked?
https://www.mapleprimes.com/questions/228216-Question-From-Maple

## Use mul....

```mul(1/(i+j),j=0..3); sum(%,i=1..infinity)=1/18;```

## ?plots[pointplot] or ?plot[pointplot3d]...

Try:

`plots[pointplot]( [seq([i,S[i]],i=1..numelems(S))], style=line);`

## One parameter....

You are missing a condition, so it acts like a parameter.

Example:

```dsys := {diff(s(x), x, x, x)+(1/2)*s(x)*(diff(s(x), x, x)) = 0, s(0) = 0, (D(s))(5) = 1}; other:=seq({D(s)(0)=i/10}, i=-8..1);; sol:=seq(dsolve(dsys union cond,numeric), cond=[other]); plots[display](map(plots[odeplot], [sol], 0..5));```

Thumb if You like.

## Like this:...

```restart; PDEtools[declare](f(x), prime = x);```

```N := 4; F := sum(p^i*f[i](x), i = 0 .. N); HPMEq := (1 - p)*(diff(F, `\$`(x, 3))) + p*((diff(F, `\$`(x, 3))) + 1/2*(diff(F, x, x))*F); for i from 0 to N do equ[2][i] := coeff(HPMEq, p, i) = 0 end do;```

```cond[1][0] := f[0](0) = 0, (D(f[0]))(0) = 0, (D(f[0]))(5) = 1; for j to N do cond[1][j] := f[j](0) = 0, (D(f[j]))(0) = 0, (D(f[j]))(5) = 0 end do; for i from 0 to N do dsolve({cond[1][i], equ[2][i]}, f[i](x)); assign(%) end do;```

```g := evalf@unapply(simplify(sum(f[n](x), n = 0 .. N)),x); convert(g(x), 'rational');   subs(x = 2.4, diff(g(x), x));```

Thumb if You like.

## You can use fsolve....

```convert(A,set): indets(%,name); fsolve(%%, % , (x->(x=0..1))~(%));```

Thumb if You like.

## Proc....

Try one of these :

```Button("Deduct", Evaluate(f = '[work(3), work(2)]')); Button("Deduct", Evaluate(f = 'proc() work(3);  work(2) end()'));```

## Op....

```2.55*10^(-90); op(%); %[1]/10^Digits; evalf(%,3);```