Preben Alsholm

13733 Reputation

22 Badges

20 years, 259 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

After having corrected for the exp problem you do get a solution using fsolve:

fsolve({x3,x4},{T,t1});

@AndrewG diff acts the usual mathematical way. The independent variable has to be a name, Expressions like phi(t) or (worse) diff(phi(t),t),t) are not names.
The Physics package, however, has an extended diff procedure. So instead of what I did you could do:

with(Physics,diff):
diff(diff(L,diff(phi(t),t)),t)-diff(L,phi(t))=0;


@lemelinm You had infinity as the upper limit of the integral in the beginning. Later you replace it by L.
So I suppose your functions are 0 outside the interval 0..L ?

@dena Why don't you use the thick green arrow in the editor's menu panel. It is the last icon. That way you can upload the worksheet for everybody to see.

 

 

@Carl Love Maybe a very simple example could be helpful:

restart;
p:=proc(x) print(is(a>0)); if is(a>0) then x else 2*x end if end proc;
p(x);
p(x) assuming a>0;
assume(a>0);
p(x);
restart;
q:=proc(a,x) print(is(a>0)); if is(a>0) then x else 2*x end if end proc;
q(a,x) assuming a>0;


@Joe Riel I just repeated the attempt. This time I first fetched your procedure directly from the link I gave above. I copied and pasted that into a worksheet in Maple 18.
Then I got 2014_PDE_project.mw from the link the questioner gave above. It opened in Maple 18 saying "Warning etc". I then saved it in a place I use for Maple worksheets.
In the worksheet with your executed procedure I executed the command
DeleteBadCharacters("G:/MapleDiverse/2014_PDE_project.mw");
and the response was the printout:
no errors in file

Writing this carefully made me realize that maybe that step of saving the (bad) file made the error go away (and throw away what couldn't be seen).

Indeed that seems to be the case. The third time I started by saving the file directly not from Maple.
Used DeleteBadCharacters as above. The report was:
"deleted bad characters: { }   
wrote updated file to G:/MapleDiverse/2014_PDE_project-fixed.mw"

#there was a square inside {} which apparently doesn't copy to MaplePrimes.

And the good news: The file was indeed fixed!

I tried using the procedure Joe Riel posted in the link

http://www.mapleprimes.com/questions/129377-There-Were-Problems-During-The-Loading

Unfortunately, his procedure DeleteBadCharacters reported
"no errors in file"

@sharena2 Actually I chose the (roughly) highest N that gave results.
To extend the result to a larger interval, you could make a change of variables eta=N*t (with N unassigned).
The resulting system will have N as a parameter. The idea then is to use continuation in N:
Assuming that for the given parameters (B and what else) the system can be solved for t=0..1 using N=N1, say. N1=4.5 would work in the situation originally considered. Say you want to see the solution on eta=0..N2. You can then use the continuation option:
'continuation' = c, where you replace N in your system by (1-c)*N1+c*N2. dsolve will start with c=0, where it will have success (since then N=N1) and use that to go forward until c=1 corresponding to N=N2.
Remember though that the results are results in the variable t. But eta=N2*t so that is basically no problem.

Added.
I just tried the continuation idea. Although I have had success with that in the past, I didn't have any success with your system.

@JEBland I changed to

x1:=unapply(<diff(X[1], u), diff(X[2], u), diff(X[3], u)>,u,v);
x2:=unapply(<(diff(X[1], v), diff(X[2], v), diff(X[3], v))>,u,v);

and defined V as

V := <v*cos(u), v*sin(u), v^2+1>;

Then executed
Christoff(V);
and
L:= dsolve({sys1,inits},numeric);
plots:-odeplot(L,[u(t),v(t)],0..500); #Just to see if there is anything there

Alternatively, keep
V := (u,v)-><v*cos(u), v*sin(u), v^2+1>;
and do
x1 :=(u,v)-><diff(X(u,v)[1], u), diff(X(u,v)[2], u), diff(X(u,v)[3], u)>;
x2 :=(u,v)-><diff(X(u,v)[1], v), diff(X(u,v)[2], v), diff(X(u,v)[3], v)>;
Christoff(V):
etc.


@sharena2 Try this very simple example, which illustrates my point. In eq1 I use dot and in eq2 I use *.
The first doesn't work, the second does.
The dot (period) is intended for matrix multiplication and should not be used if that is not what you got.

eq1 := f(x).diff(f(x), x,x)+f(x) = 1;
eq2 := f(x)*diff(f(x), x,x)+f(x) = 1;
dsolve({eq1,f(0)=3,D(f)(0)=0},numeric);
res:=dsolve({eq2,f(0)=3,D(f)(0)=0},numeric);
plots:-odeplot(res,[x,f(x)],0..10);

See
?.

 

@mehdi jafari I think the answer would depend on for what purpose 1 and 2 will be used.
Is the first an equation to be solved for B knowing X and D?
Using the name D is not a good idea, since it is likely to conflict with its use as the differentiation operator.

E:=eulermac(1/(1+k/n),k=0..n,18) assuming n::posint;
asympt(E,n,19);

@Markiyan Hirnyk And you don't think that I verified it? It is straightforward to anybody with any knowledge of fourier series.

@Carl Love You are right. I tried it and forgot to remove it. Had it worked I wouldn't have produced two animations.
I commented that version out above.

@Markiyan Hirnyk Thanks for the kind words.

First 147 148 149 150 151 152 153 Last Page 149 of 230