TransWikia.com

How to use Solve[] properly to find an integer 3d vector solution to an equation with a condition?

Mathematica Asked on January 14, 2021

I didn’t use Mathematica for years and I am VERY rusty regarding the best way to solve this problem :

2*vectk.vectG = G^2,

k = 2*pi/lambda

I have the G vector and I want to find all vector k that can fit into this previous equation. Vect k should use some "primitive" vectors b1, b2 and b3.

Clear["Global`*"];
la1 =  6.2696*10^-10;
la2 =  40.3246*10^-10;
la3 =  9.8488*10^-10;
alpha = 90;
beta = 99.464;
gamma = 90;
a1 = {la1, 0, 0};
a2 = {0, la2, 0};
a3 = {la3*Cos[beta Degree], 0, la3*Sin[beta Degree]};
omega = 2456.07*(10^-10)^3;
lambda = 1.5*10^-10;
b1 = 2*Pi*(Cross[a2, a3]/omega);
b2 = 2*Pi*(Cross[a3, a1]/omega);
b3 = 2*Pi*(Cross[a1, a2]/omega);
G[h_, k_, l_] := h*b1 + k*b2 + l*b3;
G = G[1, 7, 0]
h = 1;
k = 7;
l = 0;
Solve[2*Dot[k1*b1 + k2*b2 + k3*b3, h*b1 + k*b2 + l*b3] == 
   Norm[h*b1 + k*b2 + l*b3]^2 && 
  2*Pi*0.99/lambda <= Norm[{k1*b1 + k2*b2 + k3*b3}] <= 
   2*Pi*1.01/lambda, {k1, k2, k3}, Integers, WorkingPrecision -> 100]

When I execute I have : Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result.

I don’t know if Solve function can solve such a problem or if there is a problem with my syntax. If Solve cannot find such a solution, would you have some recommandations ? It is for a school project…

Thanks

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP