isabelmacpherson

30 Reputation

One Badge

4 years, 120 days

MaplePrimes Activity


These are questions asked by isabelmacpherson


Digits := 6:
f := (t,x,y) -> diff(x(t),t$2) = -x(t)/(x(t)^2+y(t)^2)^(3/2):
g := (t,x,y) -> diff(y(t),t$2) = -y(t)/(x(t)^2+y(t)^2)^(3/2):

t0 := 0:
x0:=1: y0:=0: tf := 3: n := 12:                 # number of subintervals
m := 2:                  # to print every mth step
h := evalf((tf - t0)/n): # step size

t:=t0: x:=x0: y:=y0:

fmt := `%10.0f %10.4f %10.4f \n`:

for i from 1 to n do
   k1 := f(t,x,y):
   l1 := g(t,x,y):                    # left-hand slopes
   k2 := f(t+h/2,x+h*k1/2,y+h*l1/2):
   l2 := g(t+h/2,x+h*k1/2,y+h*l1/2):  # 1st midpt slopes
   k3 := f(t+h/2,x+h*k2/2,y+h*l2/2):
   l3 := g(t+h/2,x+h*k2/2,y+h*l2/2):  # 2nd midpt slopes
   k4 := f(t+h,x+h*k3,y+h*l3):
   l4 := g(t+h,x+h*k3,y+h*l3):
   k := (k1+2*k2+2*k3+k4)/6:
   l := (l1+2*l2+2*l3+l4)/6:
   x := x + h*k:
   y := y + h*l:
   t := t + h:
   if trunc(i/m) =i/m then  printf(fmt,180*t,x,y) fi; od:
Error, (in f) invalid input: diff received 0, which is not valid for its 2nd argument
 

I am trying to solve a surface integral but I am not able to get Maple to give me an actual value.  Please can you help?

 

This is what I wrote:

restart;
with(Student[VectorCalculus]):
with(Student[MultivariateCalculus]):
x:=u; y:=v; z:=(2*u*v)/(4*v-3*u);
r:=<x,y,z>;
ru:=diff(r,u);
rv:=diff(r,v)
n:=simplify(CrossProduct(ru,rv));
f:=(x,y,z)->x^2*y+3*x*z-2*y^2;
simplify(Int(f(x,y,z)*Norm(n),u=1..2,v=1..4));
int(f(x,y,z)*Norm(n),u=1..2,v=1..4, numeric=true);
 

The center of mass for the density function p(r,θ,φ) = ln(r^2 + θ^2 + φ^2 +1) over the solid sphere radius 2.

I'm not sure how to do this on Maple.  

Many thanks!

I am trying to find the surface area of f(x,y) but Maple seems unable to calculate it even numerically.  Any help would be much appreciated.  I'm not sure if I have written this correctly.

 

f := (x, y) -> x^4*sin(x^2 + y^3)^2*ln(y) + 2*y*x

fx := 4*x^3*sin(y^3 + x^2)^2*ln(y) + 4*x^5*sin(y^3 + x^2)*ln(y)*cos(y^3 + x^2) + 2*y

fy := 6*x^4*sin(y^3 + x^2)*ln(y)*y^2*cos(y^3 + x^2) + x^4*sin(y^3 + x^2)^2/y + 2*x

Int(Int(sqrt(fx^2 + fy^2 + 1.), x = 0. .. 4.), y = 1. .. 5.)

 

Page 1 of 1