McParr

10 Reputation

One Badge

10 years, 238 days

MaplePrimes Activity


These are questions asked by McParr

i want to solve the 2nd order ODE y''=0.8y'arctan(x)+xy    -2<x<1

the maple code used is:

>maplesol := dsolve({ (D(D(y)))(x) =0.8*arctan(x)*(D(y))(x)+x*y(x),y(-2)=1.3,D(y)(-2)=0.7});

and maple only gives out maplesol:=

 

I think its something to do with the arctan(x) because when i remove it, i get an answer.

I need to apply the midpoint method to an initial value problem. Heres my code:

>mp := proc (f, a, b, N)
local x, k1, k2, y, i, h;
y := array(0 .. N); k1 := array(0 .. N); k2 := array(0 .. N); x := array(0 .. N);
h := evalf(b-a)/N;
x[0] := 0; y[0] := .85;

k1[0] := h*f(0, .85);

k2[0] := h*f(0, .85+.5*k1[0]);

from i = 1 to N do

x[i] := x[i-1]+h;

k1[i] := h*f(0, y[i]);

k2[i] := h*f(0, y[i]+.5*k1[i]);
y[i] := y[i-1]+k2[i-1];
print(x[i], y[i]) end do
end proc

>f := (x,y)-> 1.3/(1+y^2);

>mp(f,0,1,10);

But i get an error message saying "Error, (in mp) initial value in for loop must be numeric or character"

I want to integrate the following cumulative distribution function with variable bounds but maple returns the integral.

>with(Statistics);

>N := RandomVariable(Normal(0, 1)):

>a := (ln(98.53*(1/95))+(0.1e-1+.5*x^2)*.5)/(x*sqrt(.5))

>y:= CDF(N, a, inert = true);

How do i make maple return a function of x instead of an integral?

I'm trying to write the cumulative distribution function into maple but I seem to get an error. The code is:

>with(Statistics):

>N:=RandomVariable(Normal(0,1)):

>CDF(N,t,inert=true);

I get an error message "Error, (in Statistics:-CDF) unexpected parameters: inert = true".

It used to work, maybe because I was using a newer version of Maple.

Page 1 of 1