## 50 Reputation

8 years, 354 days

## How to create geom3d point functions?...

Maple 2022

I would like to do some point and line calculations, and the geom3d package seems a good one.

But how do I define a generic point such that I can use it in a function to generate genric points and lines?

eg

P:=(a,b,c)->point(P, a,b,c)

or equivalent?

I would then want to define generic lines between generic points.

## Why is plotting my function giving a dif...

Maple 2019

I have an issue where I believe the values given by evalf (I have independent verification), but the plot of the same function is incorrect. Specifically, g(a) plotted for a <=0 is correct, and incorrect for a > 0.

What am I doing wrong?

```g:=(a)->int(exp(-(x^2-a)^2),x=0..infinity) plot(g(a), a=-2..5) #I don't believe anything for a > 0```

```evalf(g(-1)) #I believe all of these values                           0.2059311656 evalf(g(0))                           0.9064024772 evalf(g(1))                           0.9868660750```

Mattthew

## How can I speed up this numerical integr...

Maple

Does anyone have any ideas on why this integral (third equation) is taking so long to solve/plot? Are there any hints on how to speed up the process?

I'm running Maple 2019.1, and it was chugging away for about 5 minutes before I pulled the plug.

If I have 2.14 & 10 or 2.14 & 20 as my plot arguments, it takes about 3 s. After 20, it just doesn't want to work.

```P1:=(r,R)->(2/Pi)*(arccos(r/(2*R))-(r/(2*R))*sqrt(1-(r/(2*R))^2))

J0:=(r,shk)-> BesselJ(0, 2*Pi*r*shk);

Jhk:=(s,shk,R)-> evalf((1/s)*Int(P1(r,R)*J0(r,shk)*sin(2*Pi*r*s), r=0..2*R));

plot(Jhk(s,2.14,38), s=0..5)```

## plot a fourier transform...

Maple 2016

I have defined a function, F, as

`F:=(s)->fouriersin(f(r), r, s)`

I would now like to plot that function.

`plot(F(s), s=0..3)`

How can I do that? Calls to plot don't work, as the "s" in the fouriersin definition of the function get replaced by the value I'm trying to plot.

## creating functions with derivatives in t...

Maple

I wish to define a function which is the derivative of another function.

> f:=(x)->x^2:

> g:=(x)->diff(f(x),x):

> g(x);

2 x

> f(2);

4

> g(2);
Error, (in g) invalid input: diff received 2, which is not valid for its 2nd argument

I cannot find a way in which I can define the function g, using the functional operator, so that I can actually evaluate g(x).

How can I do this?

 1 2 Page 1 of 2
﻿