Question: Issue with recursive formula

Hey, i am a undergraduate at uni and i have run in to a bit of a roadblock with Maple.

I am using the following code;

M[Star]:=2*10^(30);

M[planet]:=2*10^(27);

q:=(M[planet])/(M[Star]);

Delta[p]:=max(H,|R-a|);

Alpha(R,a):=piecewise(R<a, -(q^(2)*6.67*10^(-11)*M[Star])/(2*R)*(R/(Delta[p]))^(4) ,R>a,(q^(2)*6.67*10^(-11)*M[Star])/(2*R)*((a)/(Delta[p]))^(4) );

PDE1:=diff(S(R,t),t)=(3/(R))*(diff(R^(1/(2))*(diff( S(R,t)*R^(1/(2))-(2*Alpha(R,a)*S(R,t)^(3/(2)))/((6.67*10^(-11)*M[Star])^(1/(2))),R)),R));

I want to solve PDE1 for R, a and H are unknowns.

When i try and process this code block i get the error, "Error, (in piecewise/red) too many levels of recursion", in an attempt to troubleshoot this i put in values for H and a,  this didn't solve the error, i found that if put a value in for Delta[p] then the code processes without error although upon reaching the solving section i get the error, "Error, (in pdsolve/numeric/plot) unable to compute solution for t>0.: matrix is singular".

From what i understand of whats happening with Maple, i believe that it needs to be able to evaluate Delta[p] before processing the rest, but unfortunatley R will change as the equation is solved, and as i said we do not have values for H or a. Although my understanding of the reasons behind what we are trying to achieve, i think a may have to vary as the simulation advances.

If anyone has any ideas as to where i might be going wrong it would be greatly appreciated,

Many thanks, Josh

 

Please Wait...