Alger

489 Reputation

16 Badges

10 years, 169 days

MaplePrimes Activity


These are answers submitted by Alger

restart:

eq:=hc=(1/(2*n*sqrt(2)*a*f^2))*ln(hc/4);

isolate(eq,hc);

 

                               hc = -1/4*1/n/a/f^2*2^(1/2)*LambertW(-8*2^(1/2)*n*a*f^2)

 

f:=(a0-a)/a0: # f0 and f1 are chosen from the values of a

plot(hc,f=f0..f1);  # a0 constant and a variable

g:=(t,y)->piecewise((t<>0) and (y<>0),4*t^3*y/(t^4+y^2),(t=0) and (y=0),0);

Those two equations are solvables but with knowing boundary conditions.

First, you should solve equ2 with separation of variables (for example) as:

sol := simplify(pdsolve(equ2, HINT = R(r)*Phi[4](theta), build));

sol := phi[4](r,theta) = _C3*sin(1/F2^(1/2)*_c[1]^(1/2)*theta)*_C1*BesselJ((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)+_C3*sin(1/F2^(1/2)*_c[1]^(1/2)*theta)*_C2*BesselY((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)+_C4*cos(1/F2^(1/2)*_c[1]^(1/2)*theta)*_C1*BesselJ((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)+_C4*cos(1/F2^(1/2)*_c[1]^(1/2)*theta)*_C2*BesselY((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)

collect(rhs(sol),{cos,sin});

(_C4*_C1*BesselJ((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)+_C4*_C2*BesselY((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r))*cos(1/F2^(1/2)*_c[1]^(1/2)*theta)+(_C3*_C1*BesselJ((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r)+_C3*_C2*BesselY((_c[1]/F2)^(1/2),(F3/F2)^(1/2)*r))*sin(1/F2^(1/2)*_c[1]^(1/2)*theta)

You should replace _C4*_C1 with one constant and again for other cconstants

You should, calculate _c1,C2,C3, etc.. with your boundary conditions and after you can replace it in equ1.

The solution with separation of variables of Poisson equation equ1 is then easy with using superposition theorem.

With using sepration of variables, there is not complex solution.

The collected solution hase one term in sin multiplied with a term in r and another term in cos with a termin r.

equ1 should then solved in two stage.

In the first stage:

the solution has the form: Phi[2](r,theta):=R2(r)*sin(1/F2^(1/2)*_c[1]^(1/2)*theta)

Replace and solve then equ1 as an ODE

 

 

 

 

use add instead of sum

See help page

?add

Change those lines

m1 := 1; m2 := 1; m3 := 1; a := 5; b := 5; c := 5; g := 9.81; C := 0; tau1 := 0; tau2 := 0; tau3 := 0; f := 0; k := 0;
ini := alpha(0) = -(1/2)*Pi, D(alpha)(0) = 0, beta(0) = 0, D(beta)(0) = 0, theta(0) = 0, D(theta)(0) = 0;

Eq75 := dsolve({Eq37, ini, Eq17, Eq27}, {alpha(t), beta(t), theta(t)}, numeric, output = listprocedure);

dsolve.mws

In 3D

implicitplot3d(f(x,y)=1/4, x=-3..3, y=-3..3,z=-3..3);

In 2D

implicitplot(f(x,y)=1/4, x=-3..3, y=-3..3);

restart:

fd := fopen("C:/Users/acer/Desktop/mafem/ess.txt", WRITE);

li:=<0.00001,0.0002,0.00003>;

sigma:=<0.04,0.1,0.03>;

for i from 1 to 3 do
fprintf(fd,"%9.6f %9.6f    \n", li[i], sigma[i]);
end do;

fclose(fd):

half sphere:

plot3d(2, theta = 0 .. Pi, phi = 0 .. Pi, coords = spherical, scaling = constrained, axes = normal);

 

or

sphereplot(2, theta = 0 .. Pi, phi = 0 .. Pi, coords = spherical, scaling = constrained, axes = normal);

for 1/4 sphere:

sphereplot(2, theta = 0 .. Pi/2, phi = 0 .. Pi, coords = spherical, scaling = constrained, axes = normal);

Find here some mistakes:

restart:

u[i]:=s->A+B*s-C*exp(-s);

lambda:=(s,x)->-(1/2)*(s-x)^2;

tre:=(s,x)->lambda(s,x)*(diff(u[i](s), s, s, s)+1-(diff(u[i](s), s))^2);

int(tre(s,x),s = -infinity .. x);

fsolve((rhs(ODE_4))(t)=0,t, avoid={t10},10..20);  # t10 is the solution that you find at the first

Try also to serch complex solution with adding option complex

See

?fsolve/details

restart: with(plots);

value:=1: # for example

B:=Matrix(1..5,1..6,fill=0);

for i from 1 to 5 do for j from 1 to 6 do B[i,j]:=value: end do: end do:

or

for i from 1 to 5 do for j from 1 to 6 do B(i,j):=value: end do: end do:

matrixplot(B);

work for me

Your commands are correct

1 2 3 4 5 6 7 Page 2 of 9