Items tagged with condition condition Tagged Items Feed

May I know any command can help to random selected a position in a group of bit number then flip that number but with condition after convert to bytes the number cannot be more than 7?

For example,

I have integer 3, i convert to binary become 0000011

then i need a command to random select a position to flip and only one bit can be flipped.

After that the group of flipped number will convert back to decimal, but total value cannot more than 7? any command can solve?  Thank you. 

hi.

how i can select or chose proper polynomials or another functions that attached boundary conditions at points zero and one , weakly or strongly satisfy??polynomial.mw

s(0) = 0, ((D@@1)(s))(0) = 0, g(0) = 0, ((D@@2)(s))(1) = 0, ((D@@3)(s))(1) = 0, ((D@@1)(g))(1)+(1/2)*((D@@1)(s))(1)^2 = 0

s(0) = 0, (D(s))(0) = 0, g(0) = 0, ((D@@2)(s))(1) = 0, ((D@@3)(s))(1) = 0, (D(g))(1)+(1/2)*(D(s))(1)^2 = 0

(1)

``

 

Download polynomial.mw

thanks...

i want to solve these two coupled eqaut with finite boundary conditionsions. Can some one help me

eq1:=diff(f(eta),eta,eta,eta,eta)+2*(epsilon/(1+epsilon*theta(eta)))^2*diff(f(eta),eta,eta)*((diff(theta(eta),eta))^2)-(epsilon/(1+epsilon*theta(eta)))*(diff(theta(eta),eta,eta))*(diff(f(eta),eta,eta))=0;

eq2:=diff(theta(eta),eta,eta)+Pr*Re*f(eta)*diff(theta(eta),eta)=0;

Re:=1:Pr:=1:epsilon:=0.25:

bc:=f(1)=0,D(f)(-1)=0,D(f)(1)=1,D(f)(-1)=1,theta(-1)=0,theta(1)=0;

 


with(PDEtools, casesplit, declare)
``

L := 1651.12; m := 3205.12; r1 := .1875; r2 := 2; z1 := 0; z2 := 12; ld := 4.5

NULL

declare(u(r, z), w(r, z))``

with(DEtools, gensys)

rr := (L+2*m)*(diff(u(r, z), r))+L*(diff(w(r, z), z))+L*u(r, z)/r

zz := L*(diff(u(r, z), r))+(L+2*m)*(diff(w(r, z), z))+L*u(r, z)/r

rz := m*(diff(u(r, z), z))+m*(diff(w(r, z), r))

BCS := {rr(r1, ld) = 0, rz(r1, z) = T, w(r, 0) = 0, zz(r, z2) = 0}

{3205.12*(diff(u(r, z), z))(.1875, z)+3205.12*(diff(w(r, z), r))(.1875, z) = T, 8061.36*(diff(u(r, z), r))(.1875, 4.5)+1651.12*(diff(w(r, z), z))(.1875, 4.5)+1651.12*(u(r, z))(.1875, 4.5)/r(.1875, 4.5) = 0, 1651.12*(diff(u(r, z), r))(r, 12)+8061.36*(diff(w(r, z), z))(r, 12)+1651.12*(u(r, z))(r, 12)/r(r, 12) = 0, w(r, 0) = 0}

(1)

``

NULL

sys3 := [(L+2*m)*(diff(u(r, z), r, r))+(L+m)*(diff(w(r, z), r, z))+(L+2*m)*(diff(u(r, z), r))/r-(L+2*m)*u(r, z)/r^2+m*(diff(u(r, z), z, z)) = 0, (L+m)*(diff(u(r, z), r, z))+m*(diff(w(r, z), r, r))+(L+2*m)*(diff(w(r, z), z, z))+(L+m)*(diff(u(r, z), z))/r+m*(diff(w(r, z), r))/r = 0]

pdsolve(sys3, BCS, numeric)

 

 

``

``


Download PDE_equation2.mw

Hi all,

I have the following PDE, is it solveable by Maple or not. Do I need a boundary condition and how many or I can get a general solution? I am new to Maple. Any help will be appreciated.

Thank you.

 

 

 

Hello,

I'm sorry to bother you but I have a problem with the numeric resolution of a system of 3 differential equations. The system is as follows  : sysdif :=

As you can see the system is composed of 3 differential equations, and I enter initial conditions in the object "sysd". Then I try a numeric resolution by executing the following command (I give a value to parameters before)  :

Then Maple's answer is : Error, (in dsolve/numeric/process_input) missing differential equations and initial or boundary conditions in the first argument: sysdif.

I can't see where I'm wrong, does anyone notice something that could explain this error message ? There's no help page about this error so I ask the question here.

Thank you very much for your time if you answer this,

Louis

Can somebody help me to find the solution?

I think there is something wrong with the definition of bvw1. If I use dsolve (in soln) with only bvw as Initial Condition,

I get a solution but if I also insert bvw1 as an Initial condition soln won't appear.

Here's what's written in the image:

'Imagine the course of a planet around a star with L=0.5 and e=0.7'

Solve Keppler's differential equation with Initial Conditions:'

HI, I am trying to solve two PDEs but in boundry conditions there is arising an error plz help.
Nazi.mw

In Maple 15 it seems that plottools:-transform only accepts this form of conditional statement:  

`if`(conditional expression, true expression, false expression).

Is there any way to have plottools:-transform process more than one condition? Do later versions of Maple permit this?

In the following problem though b and c are same (except the way denominator 2 is hanfled), command ' a-b ' readily answers zero, but a-c not so. Why? Only on condition of assumption real it gives zero!

a := (1/2)*(kappa*omega^2+omega^3)*(Y+(1/2)*(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(kappa*omega^2+omega^3))^2/omega:

b := (1/2)*(kappa*omega^2+omega^3)*(Y+(1/2)*(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(kappa*omega^2+omega^3))^2/omega:

a-b;

0

(1)

c := (1/2)*(kappa*omega^2+omega^3)*(Y+(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(kappa*omega^2+omega^3)))^2/omega:

a-c;

(1/2)*(kappa*omega^2+omega^3)*(Y+(1/2)*(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(kappa*omega^2+omega^3))^2/omega-(1/2)*(kappa*omega^2+omega^3)*(Y+(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*kappa*omega^2+2*omega^3))^2/omega

(2)

"(->)"

0

(3)

``

Why the answer is not given as zero?

``

``

 

Download what_is_the_difference_between_b_and_c.mw

What difference therms b and c make for Maple? Are they not same?

Ramakrishnan V

rukmini_ramki@hotmail.com

Hi

 

f := x->x^2:

AB(f, 0, 5);

But my proc is not true for below example:

f := x -> x^3-2*x;
AB(f, -1, 4);
I think c has two value and it is not true.

How can I add a condition to my proc that c be between a and b (a<c<b)?

 

 

restart;

with(DETools, diff_table);

kB := 0.138064852e-22;

R := 287.058;

T := 293;

p := 101325;

rho := 0.1e-2*p/(R*T);

vr := diff_table(v_r(r, z));

vz := diff_table(v_z(r, z));

eq_r := 0 = 0;

eq_p := (vr[z]-vz[r])*vr[] = (vr[]*(vr[r, z]-vz[r, r])+vz[]*(vr[z, z]-vz[z, r]))*r;

eq_z := 0 = 0;

eq_m := r*vr[r]+r*vz[z]+vr[] = 0;

pde := {eq_m, eq_p};

IBC := {v_r(1, z) = 0, v_r(r, 0) = 0, v_z(1, z) = 0, v_z(r, 0) = r^2-1};

sol := pdsolve(pde, IBC, numeric, time = z, range = 0 .. 1);

 

what am I doing wrong?

it's telling me: Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 3, got 2
but i did just as in the example :-/

Hi everyone,

I am trying to solve the equation of heat tranfer, time dependent, with particular Initial and boundary conditions but I am stuck by technical problems both in getting an analytical solution and a numerical one.

The equation

the equation.

I defined a and b numerically. domain is : and I defined surf_power numerically.

The initial condition is : , T0 defined numerically

The boundary condition is : , because it has a shperical symetry.

To me, it looks like a well posed problem. Does it look fine ?

Problem in analytical solution :

It doesn't accept the boundary condition so I only input the initial condition and it actually gives me back an expression that can be evaluated but it never does : I can't reduce it more than an expression of fourier which I can't eval. The solution :
The solution calculated in (0,0). I was hoping T0...

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ?

The numerical solution problems :

Sometimes it tells me that my boundary condition is equivalent  to 0 = 0, and I don't see why. Some other times it tells me I only gave 1 boundary/initial condition even if I wrote both. Here is what I wrote for example :

(because it kept asking me to add these two options : 'time' and 'range')

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ? I must at least have syntax problems because even if I keep reading the Help, it's been a long time since I used Maple.

Thank very much for any indication you could give me !

Simon

Hi everyone.

I have been experiencing a problem trying to solve a coupled system of 3 differencial equations

My problem is that a got a message back as I try to solve the system:

"Error, (in pdsolve/numeric/process_IBCs) improper op or subscript selector"

by apply this point that ''all dependent variables must be functions of the same independent variables''

i again accost with another error ''

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[1, 1](w))(x, -3/400000000)

''

please help me.....very very thanks

I have the following characteristic equation by use of maple. How do I find a condition on x, that will return real eigenvalues and complex eigenvalues?

 

 

 

Dear All,

I am solving 6 ODE equations with boundary conditions using Runge kutta Felbergh 45 (Maple 12). then, i got this problem.. any suggestion??

Thank you :)

ISPC3.mw

``

restart; with(plots); M := 3; k = .2; blt := 6; r := 2; l := .1; Pr := 6.8; Ec := 2; N := .5; rho := .5; Tv := .5; Tt := .5; c := 1; cm := .1; cp := .1

Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2-M*(diff(f(eta), eta))+B*H(eta)*(F(eta)-(diff(f(eta), eta))) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2-3*(diff(f(eta), eta))+B*H(eta)*(F(eta)-(diff(f(eta), eta))) = 0

(1)

Eq2 := G(eta)*(diff(F(eta), eta))+F(eta)^2+B*(F(eta)-(diff(f(eta), eta))) = 0;

G(eta)*(diff(F(eta), eta))+F(eta)^2+B*(F(eta)-(diff(f(eta), eta))) = 0

(2)

Eq3 := G(eta)*(diff(G(eta), eta))+B*(f(eta)+G(eta)) = 0;

G(eta)*(diff(G(eta), eta))+B*(f(eta)+G(eta)) = 0

(3)

Eq4 := G(eta)*(diff(H(eta), eta))+H(eta)*(diff(G(eta), eta))+F(eta)*H(eta) = 0;

G(eta)*(diff(H(eta), eta))+H(eta)*(diff(G(eta), eta))+F(eta)*H(eta) = 0

(4)

Eq5 := diff(theta(eta), eta, eta)+Pr*(f(eta)*(diff(theta(eta), eta))-2*(diff(f(eta), eta))*theta(eta))+N*Pr*(theta1(eta)-theta(eta))/(rho*c*Tt)+N*Pr*Ec*(F(eta)-(diff(f(eta), eta)))^2/(rho*Tv) = 0;

diff(diff(theta(eta), eta), eta)+6.8*f(eta)*(diff(theta(eta), eta))-13.6*(diff(f(eta), eta))*theta(eta)+13.60000000*theta1(eta)-13.60000000*theta(eta)+27.20000000*(F(eta)-(diff(f(eta), eta)))^2 = 0

(5)

Eq6 := 2*F(eta)*theta1(eta)+G(eta)*(diff(theta1(eta), eta))+cp*(theta1(eta)-theta(eta))/(c*cm*Tt) = 0;

2*F(eta)*theta1(eta)+G(eta)*(diff(theta1(eta), eta))+2.000000000*theta1(eta)-2.000000000*theta(eta) = 0

(6)

bcs1 := f(0) = r, (D(f))(0) = -1, (D(f))(blt) = 0, F(blt) = 0, G(blt) = -f(blt), H(blt) = k, theta(0) = 1, theta(blt) = 0, theta1(blt) = 0;

f(0) = 2, (D(f))(0) = -1, (D(f))(6) = 0, F(6) = 0, G(6) = -f(6), H(6) = k, theta(0) = 1, theta(6) = 0, theta1(6) = 0

(7)

L := [0.1e-2];

[0.1e-2]

(8)

for k to 1 do R := dsolve(eval({Eq1, Eq2, Eq3, Eq4, Eq5, Eq6, bcs1}, B = L[k]), [f(eta), F(eta), G(eta), H(eta), theta(eta), theta1(eta)], numeric, output = listprocedure); Y || k := rhs(R[2]); YP || k := rhs(R[3]); YR || k := rhs(R[4]); YQ || k := rhs(R[5]) end do

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

R

R

(9)

print([(YP || (1 .. 1))(0)]);

[YP1(0)]

(10)

``

P1 := plot([YP || (1 .. 1)], 0 .. 14, labels = [eta, (D(f))(eta)]):

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

plots:-display([P1]);

 

``

``


Download ISPC3.mw

1 2 3 4 5 Page 1 of 5