J4James

335 Reputation

12 Badges

9 years, 72 days

MaplePrimes Activity


These are replies submitted by J4James

@Carl Love 

Now when I try to convert to piecewise function, I get an error for the case x<=y

collect(expand(convert((simplify(sol)),piecewise)),x) assuming x <= y;

Error, (in assuming) when calling 'PiecewiseTools:-Convert'. Received: 'give the main variable as a second argument'
 

Also the collect commond does not work.

 

@Kitonum 

"The starting point for f(x)=x in 0<x<4 has to be x-x/4*4 "

1. x-x/4*4=0 which is the lower point in the interval (0, 4)

2. in the same way x-((x+2)/4)*4=-2 which is the lower point in the interval (-2, 2)

I still didn't get it. why we need to use type(x/4, integer)=false?

@Kitonum 

1. The starting point for f(x)=x in 0<x<4 has to be x-x/4*4?

2. Why in the piecewise we have to take type((x)/4,integer)=false?

f:=x->piecewise(type((x)/4,integer)=false,x-floor((x)/4)*4, undefined);
A:=plot(f(x-4), x=-12..12, scaling=constrained, discont):
B:=plot([seq([-8+4*k,0],k=0..4), seq([-8+4*k,4],k=0..4) ],style=point, symbol=circle):
plots[display](A, B);

@Kitonum If we the same function and change the interval 0<x<4 then how we can have the circles?

@Preben Alsholm 

In Mathematica, we can handle such problem by defining h[x] == f[x] + g[x] with a condition h[0]=1

ode1 = f''[x] + h[x]*f'[x] == 0
ode2 = g''[x] + h[x]*g'[x] == 0
ode3 = h[x] == f[x] + g[x]
ics = {h[0] == 1, f'[0] == 0, g'[0] == 1};
system = {ode1, ode2, ode3}
soln = NDSolve[Join[system, ics], {f[x], g[x]}, {x, 0, 5}]

Is it possible to do the same in maple?

ode3:=h(x)=f(x)+g(x);
ics:=h(0)=1,D(f)(0) =0,D(g)(0) =1;

dsolve({ode1,ode2,ode3,ics},numeric);

Error, (in dsolve/numeric/DAE/initial) missing initial conditions for the following: {f, g}

Just for info, the parameter option does not work if we are dealing with a BVP. (If I am wrong correct me)
 

Edit

Sorry for missunderstanding. I do not want to choose a random value for f0 but with the parameter option it seems that I have no other option except to choose a random value. 
 

@Preben Alsholm 

As you suggested, I did this

ics:= f(0) = f0, g(0)= 1-f0, D(f)(0)=0, D(g)(0)=1;

sol := dsolve( {ode1,ode2,ics}, numeric, parameters=[f0] );
sol( parameters=[0.1] );

Now my question is, on what basis, I have to choose the value for the parameter because I can choose any random value?

My second question is, How is this parameter option different from taking a random value for f0 in the first place? 

@Preben Alsholm 

You are right, we need four initial conditions but this condition f(0)+g(0) = a (say) combines the two.

In your example, You meant to say that the condition f(0)+g(0)=1 can be written as f(0)=0.3 and g(0)=0.7. Why not f(0)=0.7 and g(0)=0.3 and this arugment continuesand we can take different combinations.

 

@Carl Love 

I fail to understand that the surface and the 2D curve never touch each other. Why is that?

@Carl Love 

Thanks dear.

@Carl Love 

I didn't mean that, I am just asking a question. Here is my try but gets an error

restart;with(plots):implicitplot3d(exp(x+y+z)=0,x=0..1,y=0..1,z=0..1);

How you end up with -x-y+ln(C) ? Just by taking ln?

@Carl Love 

Why cannot we use implicitplot3d to plot exp(x+y+z)?

@Kitonum 

Thanks

One other question, how we can use infolevel command?

if we want to know the details of int(exp(x)*sin(x),x)?

Where is the equation? It's hard to guess the possible issue.

@Preben Alsholm

I was looking to utilize the "HINT=f(x)*g(t)" to find the solution.

But now I just realized my mistake which is, I need to use BCs not ICs.

pdsolve({Eq1,u(0,t)=0, u(1,t)=0},HINT=f(x)*g(t));

u(x, t) = _C4*sin(Pi*x*abs(_Z1))*(_C2*sin(Pi*t*abs(_Z1))+_C3*cos(Pi*t*abs(_Z1)))

Thanks

 

@Markiyan Hirnyk 

I didn't got you at first. 

1 2 3 4 5 6 7 Last Page 3 of 21