Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@raj2018 You should be much more precise in formulating your question.  You have gotten no answers because what you have asked is extremely vague.

Consider this. Your system has the obvious solution u(x,t)=0 and w(x,t)=0. So in the series expansion that you are searching, you may take u0 = u1 = u2 = ... = 0, and w0 = w1 = w2 = ... = 0 and be done with it. If you don't like that, then you must have something else in mind that you have not stated.

 

@fatemeh1090 Here is what you need to enter in Maple

restart;
# Here is your quadratic polynomial
p := simplify((1 - u)*(u - m) - q*(u + c) + u*(1 + m - 2*u) - s);
# Here is the quadratic's discreminant
Delta := (2*m-q+2)^2 - 4*(-3)*(-q*c-m-s);
# Apply the quadratic formula to obtain the two solutions:
u1 := (-(2*m-q+2) + sqrt(Delta))/(2*(-3));
u2 := (-(2*m-q+2) - sqrt(Delta))/(2*(-3));
# Plug in u=u1 and u=u2 to test
simplify(eval(p, u=u1));
simplify(eval(p, u=u2));
# We could have asked Maple to solve the quadratic for us.  This gives
# the same expressions for u1 and u2 which we entered manually.
solve(p, u);

Here is the same code in worksheet form:   Download mw.mw

@ANANDMUNAGALA The Maple code is already there.  Note the "Download mw2.mw" link.

@goulet80 The problem you had asked about yesterday is quite different from this one. Yours has two dependent variables, r(t) and theta(t).  These are dependent on the independent variable t. The application of the Euler-Lagrange formalism leads to a pair of ODEs for r(t) and theta(t).

The problem asked above has one dependent variable, u(x,y), and two independent variables, x and y.  The application of the Euler-Lagrange formalism leads to a single PDE for the function u(x,y).

I can see how the terminology can be confusing, but that's something that one gets used to.

 

@Carl Love Okay, that will work.

@Carl Love That proc may be useful for something but it goes against the OP's requirement of "without having to ... keep the command prompt busy in Maple".

This doesn't answer your question but it accomplishes what appears to be your objective:

restart;
vars   := [a, b__c, t[1]];
assign(vars =~ [$1..3]);

 

@acer Thanks for noting the {`+`,`*`}.  Somehow I had assumed (incorrectly) that the ts option to frontend supplements the default `+`,`*`.  It is clear now that it overrides it.

 

@acer That's a collection of good ideas. Vote up!

The OP needs to be aware, however, that although frontend() works in this case, it is not a universal solution.  For instance,

frontend(diff, [x(t)^2 + sin(x(t)), x(t)]);

yields 2 x(t), which is not what is expected.  This can be fixed by giving an extra option to frontend, as in

frontend(diff, [x(t)^2 + sin(x(t)), x(t)], [{},{sin}]);

which produces the correct result, but even that is not fool-proof as seen in:

frontend(diff, [x(t)^2 + sin(x(t)+y(t)), x(t)], [{},{sin}]);

which yields the incorrect result 2 x(t).  Perhaps that too can be fixed by providing additional options to frontend but I don't see how right now.

 

@andmail This proc, which returns the area of any polygon, may be of use to you.

restart;

This proc returns the area of an n-gon whose vertices are given
as a list of lists L = [[x__1, y__2], () .. (), [x__n, y__n]] or as a list of vectors

"L=[ <`x__1`,`y__1`>, ..., <`x__n`,`y__n`> ]."  It is assumed that
  the vertices are listed in the counterclockwise order,
  the n-gon does not self-intersect.

polygon_area := proc(L)
  local n := nops(L);
  add(L[i][1]*L[i+1][2] - L[i][2]*L[i+1][1], i=1..n-1)
   + L[n][1]*L[1][2] - L[n][2]*L[1][1];
  return %/2;
end proc:

Example: The area of a rectangle

polygon_area([[0,0],[1,0],[1,5],[0,5]]);

5

Example: The area of a regular pentagon

polygon_area([<cos(2*Pi/5*i), sin(2*Pi/5*i)> $i=1..5]):
convert(simplify(%), radical);

(5/8)*2^(1/2)*(5+5^(1/2))^(1/2)

Download mw.mw

 

@HaHu Do this

plot([x^2, 1-x^2], x=0..1, color=[red,green], legend=[supply, demand]);

@acer I have been interested in coloring spacecurves but I haven't figured out a good way of doing that.  What you have suggested is very helpful.  Additionally, I would like to learn how to colorize a curve based on its parametric representation.  Earlier in this thread you referred to an older discussion where you do that but the illustration there is too complicated for me to grasp the underlying idea.  Would you be able to provide a simpler example of doing that?  For instance, let's take the spacecurve

with(LinearAlgebra):
C := <cos(t), 2*sin(t), t^2/20>;
C1, C2 := diff(C,t), diff(C,t,t);
kappa := Norm(CrossProduct(C1,C2),2) / Norm(C1,2)^3; # curvature

How do we color C over the range 0 < t < 2*Pi according to the curvature kappa? It will be illuminating to see how that is done.

 

@Earl Yes, normals to two smooth (i.e. differentiable) surfaces at their point of tangency are always collinear.  That's a consequence of the following two definitions.

  1. Definition: Two smooth surfaces are tangent to each other at a common point P if their tangent planes at P coincide. 
  2. Definition: A normal vector to a smooth surface at a point P is a (nonzero) vector which is perpendicular to the tangent plane at P.

Show what you did to get a solution that looks like a step function.

In general, it is a good idea to upload a worksheet to show your work rather than saying something vague like "it didn't work".

 

People here will be happy to help with you with problems that you encounter in using Maple, but they are not here to do your homework problems for you.

Show what you have done so far, and point out where you need help.

 

First 31 32 33 34 35 36 37 Last Page 33 of 91